Fabrice-TIERCELIN commited on
Commit
33782f1
·
verified ·
1 Parent(s): 128515f

Upload 2 files

Browse files
scripts/run_sample_video_fp8.sh ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Description: This script demonstrates how to inference a video based on HunyuanVideo model
3
+ DIT_CKPT_PATH={PATH_TO}/{MODEL_NAME}_model_states_fp8.pt
4
+
5
+ python3 sample_video.py \
6
+ --dit-weight ${DIT_CKPT_PATH} \
7
+ --video-size 720 1280 \
8
+ --video-length 129 \
9
+ --infer-steps 50 \
10
+ --prompt "A cat walks on the grass, realistic style." \
11
+ --seed 42 \
12
+ --embedded-cfg-scale 6.0 \
13
+ --flow-shift 7.0 \
14
+ --flow-reverse \
15
+ --use-cpu-offload \
16
+ --use-fp8 \
17
+ --save-path ./results
scripts/run_sample_video_multigpu.sh ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Description: This script demonstrates how to inference a video based on HunyuanVideo model
3
+
4
+ # Supported Parallel Configurations
5
+ # | --video-size | --video-length | --ulysses-degree x --ring-degree | --nproc_per_node |
6
+ # |----------------------|----------------|----------------------------------|------------------|
7
+ # | 1280 720 or 720 1280 | 129 | 8x1,4x2,2x4,1x8 | 8 |
8
+ # | 1280 720 or 720 1280 | 129 | 1x5 | 5 |
9
+ # | 1280 720 or 720 1280 | 129 | 4x1,2x2,1x4 | 4 |
10
+ # | 1280 720 or 720 1280 | 129 | 3x1,1x3 | 3 |
11
+ # | 1280 720 or 720 1280 | 129 | 2x1,1x2 | 2 |
12
+ # | 1104 832 or 832 1104 | 129 | 4x1,2x2,1x4 | 4 |
13
+ # | 1104 832 or 832 1104 | 129 | 3x1,1x3 | 3 |
14
+ # | 1104 832 or 832 1104 | 129 | 2x1,1x2 | 2 |
15
+ # | 960 960 | 129 | 6x1,3x2,2x3,1x6 | 6 |
16
+ # | 960 960 | 129 | 4x1,2x2,1x4 | 4 |
17
+ # | 960 960 | 129 | 3x1,1x3 | 3 |
18
+ # | 960 960 | 129 | 1x2,2x1 | 2 |
19
+ # | 960 544 or 544 960 | 129 | 6x1,3x2,2x3,1x6 | 6 |
20
+ # | 960 544 or 544 960 | 129 | 4x1,2x2,1x4 | 4 |
21
+ # | 960 544 or 544 960 | 129 | 3x1,1x3 | 3 |
22
+ # | 960 544 or 544 960 | 129 | 1x2,2x1 | 2 |
23
+ # | 832 624 or 624 832 | 129 | 4x1,2x2,1x4 | 4 |
24
+ # | 624 832 or 624 832 | 129 | 3x1,1x3 | 3 |
25
+ # | 832 624 or 624 832 | 129 | 2x1,1x2 | 2 |
26
+ # | 720 720 | 129 | 1x5 | 5 |
27
+ # | 720 720 | 129 | 3x1,1x3 | 3 |
28
+
29
+ export TOKENIZERS_PARALLELISM=false
30
+
31
+ export NPROC_PER_NODE=8
32
+ export ULYSSES_DEGREE=8
33
+ export RING_DEGREE=1
34
+
35
+ torchrun --nproc_per_node=$NPROC_PER_NODE sample_video.py \
36
+ --video-size 720 1280 \
37
+ --video-length 129 \
38
+ --infer-steps 50 \
39
+ --prompt "A cat walks on the grass, realistic style." \
40
+ --seed 42 \
41
+ --embedded-cfg-scale 6.0 \
42
+ --flow-shift 7.0 \
43
+ --flow-reverse \
44
+ --ulysses-degree=$ULYSSES_DEGREE \
45
+ --ring-degree=$RING_DEGREE \
46
+ --save-path ./results