Skip to content

Commit

Permalink
upgrade diffusers to 0.30.3 (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
feifeibear authored Sep 20, 2024
1 parent e506417 commit 14beeb3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions examples/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export PYTHONPATH=$PWD:$PYTHONPATH
# or you can simply use the model's ID on Hugging Face,
# which will then be downloaded to the default cache path on Hugging Face.

export MODEL_TYPE="Sd3"
export MODEL_TYPE="Flux"
# Configuration for different model types
# script, model_id, inference_step
declare -A MODEL_CONFIGS=(
Expand Down Expand Up @@ -55,16 +55,19 @@ else
fi

# Flux only supports SP, do not set the pipefusion degree
if [ "$MODEL_TYPE" = "Flux" ] || [ "$MODEL_TYPE" = "CogVideoX" ]; then
if [ "$MODEL_TYPE" = "Flux" ]; then
PARALLEL_ARGS="--ulysses_degree $N_GPUS"
export CFG_ARGS=""
elif [ "$MODEL_TYPE" = "CogVideoX" ]; then
PARALLEL_ARGS="--ulysses_degree 2 --ring_degree 1"
export CFG_ARGS=""
elif [ "$MODEL_TYPE" = "HunyuanDiT" ]; then
# HunyuanDiT asserts sp_degree <=2, or the output will be incorrect.
PARALLEL_ARGS="--pipefusion_parallel_degree 1 --ulysses_degree 2 --ring_degree 1"
export CFG_ARGS="--use_cfg_parallel"
else
# On 8 gpus, pp=2, ulysses=2, ring=1, cfg_parallel=2 (split batch)
PARALLEL_ARGS="--pipefusion_parallel_degree 2 --ulysses_degree 2 --ring_degree 1"
PARALLEL_ARGS="--pipefusion_parallel_degree 2 --ulysses_degree 1 --ring_degree 1"
export CFG_ARGS="--use_cfg_parallel"
fi

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_cuda_version():
install_requires=[
"torch>=2.1.0",
"accelerate>=0.33.0",
"diffusers @ git+https://github.com/huggingface/diffusers.git",
"diffusers>=0.30.3", # NOTE: diffusers>=0.32.3 is necessary for CogVideoX and Flux
"transformers>=4.39.1",
"sentencepiece>=0.1.99",
"beautifulsoup4>=4.12.3",
Expand Down

0 comments on commit 14beeb3

Please sign in to comment.