update README

This commit is contained in:
Peiyuan Zhang
2025-02-18 19:01:51 +00:00
parent 3fe810464a
commit 8bfe08b826
2 changed files with 28 additions and 4 deletions
+2 -2
View File
@@ -45,9 +45,9 @@ First, download the model:
```
python scripts/huggingface/download_hf.py --repo_id=FastVideo/hunyuan --local_dir=data/hunyuan --repo_type=model
```
You can use the following script to run inference with STA + [TeaCache](https://github.com/ali-vilab/TeaCache) to enjoy training-free 3x speed up. Turn on ```--enable_torch_compile``` when only use STA, and use ```--enable_teacache``` when using both.
We provide two examples in the following script to run inference with STA + [TeaCache](https://github.com/ali-vilab/TeaCache) and STA only.
```
sh scripts/inference/inference_hunyuan_STA.sh
scripts/inference/inference_hunyuan_STA.sh
```
### Video Demos using STA + Teacache
Visit our [demo website](https://fast-video.github.io/) to explore our complete collection of examples. We shorten a single video generation process from 945s to 317s on a single H100.
+26 -2
View File
@@ -1,9 +1,10 @@
#!/bin/bash
# Inference with STA + Teacache
num_gpus=1
mask_strategy_file_path=assets/mask_strategy.json
export MODEL_BASE=data/hunyuan
rel_l1_thresh=0.2
rel_l1_thresh=0.15
CUDA_VISIBLE_DEVICES=1 torchrun --nnodes=1 --nproc_per_node=$num_gpus --master_port 29603 \
fastvideo/sample/sample_t2v_hunyuan_STA.py \
--height 768 \
@@ -22,4 +23,27 @@ CUDA_VISIBLE_DEVICES=1 torchrun --nnodes=1 --nproc_per_node=$num_gpus --master_p
--rel_l1_thresh $rel_l1_thresh \
--dit-weight ${MODEL_BASE}/hunyuan-video-t2v-720p/transformers/mp_rank_00_model_states.pt \
--vae-sp \
--enable_teacache
--enable_teacache
# Inference with STA only
num_gpus=1
mask_strategy_file_path=assets/mask_strategy.json
export MODEL_BASE=data/hunyuan
CUDA_VISIBLE_DEVICES=1 torchrun --nnodes=1 --nproc_per_node=$num_gpus --master_port 29603 \
fastvideo/sample/sample_t2v_hunyuan_STA.py \
--height 768 \
--width 1280 \
--num_frames 117 \
--num_inference_steps 50 \
--guidance_scale 1 \
--embedded_cfg_scale 6 \
--flow_shift 7 \
--flow-reverse \
--prompt ./assets/prompt.txt \
--seed 12345 \
--output_path outputs_video/hunyuan_STA/ \
--model_path $MODEL_BASE \
--mask_strategy_file_path $mask_strategy_file_path \
--dit-weight ${MODEL_BASE}/hunyuan-video-t2v-720p/transformers/mp_rank_00_model_states.pt \
--vae-sp \
--enable_torch_compile