-
Notifications
You must be signed in to change notification settings - Fork 56
/
run_cogvideo.sh
40 lines (33 loc) · 974 Bytes
/
run_cogvideo.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
set -x
export PYTHONPATH=$PWD:$PYTHONPATH
# CogVideoX configuration
SCRIPT="cogvideox_example.py"
MODEL_ID="/cfs/dit/CogVideoX1.5-5B"
INFERENCE_STEP=50
mkdir -p ./results
# CogVideoX specific task args
TASK_ARGS="--height 768 --width 1360 --num_frames 17"
# CogVideoX parallel configuration
N_GPUS=8
PARALLEL_ARGS="--ulysses_degree 2 --ring_degree 2"
CFG_ARGS="--use_cfg_parallel"
# Uncomment and modify these as needed
# PIPEFUSION_ARGS="--num_pipeline_patch 8"
# OUTPUT_ARGS="--output_type latent"
# PARALLLEL_VAE="--use_parallel_vae"
ENABLE_TILING="--enable_tiling"
# COMPILE_FLAG="--use_torch_compile"
torchrun --nproc_per_node=$N_GPUS ./examples/$SCRIPT \
--model $MODEL_ID \
$PARALLEL_ARGS \
$TASK_ARGS \
$PIPEFUSION_ARGS \
$OUTPUT_ARGS \
--num_inference_steps $INFERENCE_STEP \
--warmup_steps 0 \
--prompt "A little girl is riding a bicycle at high speed. Focused, detailed, realistic." \
$CFG_ARGS \
$PARALLLEL_VAE \
$ENABLE_TILING \
$COMPILE_FLAG