-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathrun_hunyuan_video.sh
More file actions
executable file
·44 lines (36 loc) · 1.07 KB
/
run_hunyuan_video.sh
File metadata and controls
executable file
·44 lines (36 loc) · 1.07 KB
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
41
42
43
#!/bin/bash
set -x
export PYTHONPATH=$PWD:$PYTHONPATH
# CogVideoX configuration
SCRIPT="teacache/hunyuanvideo_teacache.py"
MODEL_ID="./hunyuanvideo-community/HunyuanVideo/"
# MODEL_ID="tencent/HunyuanVideo"
INFERENCE_STEP=50
mkdir -p ./results
# CogVideoX specific task args
TASK_ARGS="--height 720 --width 1280 --num_frames 129"
# CogVideoX parallel configuration
N_GPUS=8
PARALLEL_ARGS="--ulysses_degree 8 --ring_degree 1"
# 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"
ENABLE_MODEL_CPU_OFFLOAD="--enable_model_cpu_offload"
# COMPILE_FLAG="--use_torch_compile"
torchrun --nproc_per_node=$N_GPUS $SCRIPT \
--model $MODEL_ID \
$PARALLEL_ARGS \
$TASK_ARGS \
$PIPEFUSION_ARGS \
$OUTPUT_ARGS \
--num_inference_steps $INFERENCE_STEP \
--warmup_steps 0 \
--prompt "A cat walks on the grass, a dog chasing after a boy, realistic" \
$CFG_ARGS \
$PARALLLEL_VAE \
$ENABLE_TILING \
$ENABLE_MODEL_CPU_OFFLOAD \
$COMPILE_FLAG