Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# AccVideo: Accelerating Video Diffusion Model with Synthetic Dataset
|
| 2 |
+
|
| 3 |
+
This repository contains the pre-trained weights of [AccVideo](). AccVideo is a novel efficient distillation method to accelerate video diffusion models with synthetic datset. Our method is 8.5x faster than HunyuanVideo.
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
[]()[](https://aejion.github.io/accvideo/)
|
| 7 |
+
|
| 8 |
+
## π₯π₯π₯ News
|
| 9 |
+
|
| 10 |
+
* Mar, 2025: We release the inference code and model weights of AccVideo.
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
## π Open-source Plan
|
| 15 |
+
|
| 16 |
+
- [x] Inference
|
| 17 |
+
- [x] Checkpoints
|
| 18 |
+
- [ ] Multi-GPU Inference
|
| 19 |
+
- [ ] Synthetic Video Dataset, SynVid
|
| 20 |
+
- [ ] Training
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
## π§ Installation
|
| 24 |
+
The code is tested on Python 3.10.0, CUDA 11.8 and A100.
|
| 25 |
+
```
|
| 26 |
+
conda create -n accvideo python==3.10.0
|
| 27 |
+
conda activate accvideo
|
| 28 |
+
|
| 29 |
+
pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu118
|
| 30 |
+
pip install -r requirements.txt
|
| 31 |
+
pip install flash-attn==2.7.3 --no-build-isolation
|
| 32 |
+
pip install "huggingface_hub[cli]"
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
## π€ Checkpoints
|
| 36 |
+
To download the checkpoints, use the following command:
|
| 37 |
+
```bash
|
| 38 |
+
# Download the model weight
|
| 39 |
+
huggingface-cli download aejion/AccVideo --local-dir ./ckpts
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
## π Inference
|
| 43 |
+
We recommend using a GPU with 80GB of memory. To run the inference, use the following command:
|
| 44 |
+
```bash
|
| 45 |
+
export MODEL_BASE=./ckpts
|
| 46 |
+
python sample_t2v.py \
|
| 47 |
+
--height 544 \
|
| 48 |
+
--width 960 \
|
| 49 |
+
--num_frames 93 \
|
| 50 |
+
--num_inference_steps 50 \
|
| 51 |
+
--guidance_scale 1 \
|
| 52 |
+
--embedded_cfg_scale 6 \
|
| 53 |
+
--flow_shift 7 \
|
| 54 |
+
--flow-reverse \
|
| 55 |
+
--prompt_file ./assets/prompt.txt \
|
| 56 |
+
--seed 1024 \
|
| 57 |
+
--output_path ./results/accvideo-544p \
|
| 58 |
+
--model_path ./ckpts \
|
| 59 |
+
--dit-weight ./ckpts/accvideo-t2v-5-steps/diffusion_pytorch_model.pt
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
The following table shows the comparisons on inference time using a single A100 GPU:
|
| 63 |
+
|
| 64 |
+
| Model | Setting(height/width/frame) | Inference Time(s) |
|
| 65 |
+
|:------------:|:---------------------------:|:-----------------:|
|
| 66 |
+
| HunyuanVideo | 720px1280px129f | 3234 |
|
| 67 |
+
| Ours | 720px1280px129f | 380(8.5x faster) |
|
| 68 |
+
| HunyuanVideo | 544px960px93f | 704 |
|
| 69 |
+
| Ours | 544px960px93f | 91(7.7x faster) |
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
## π BibTeX
|
| 73 |
+
|
| 74 |
+
If you find [AccVideo]() useful for your research and applications, please cite using this BibTeX:
|
| 75 |
+
|
| 76 |
+
```BibTeX
|
| 77 |
+
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
## Acknowledgements
|
| 81 |
+
The code is built upon [FastVideo](https://github.com/hao-ai-lab/FastVideo) and [HunyuanVideo](https://github.com/Tencent/HunyuanVideo), we thank all the contributors for open-sourcing.
|