Datasets:

Modalities:
Video
Size:
< 1K
ArXiv:
Tags:
art
Libraries:
Datasets
License:
hanzhn commited on
Commit
13a222a
·
verified ·
1 Parent(s): 86ff633

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +189 -3
README.md CHANGED
@@ -1,3 +1,189 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+
5
+ <p align="center">
6
+
7
+ <h1 align="center">VACE: All-in-One Video Creation and Editing</h1>
8
+ <p align="center">
9
+ <strong>Zeyinzi Jiang<sup>*</sup></strong>
10
+ ·
11
+ <strong>Zhen Han<sup>*</sup></strong>
12
+ ·
13
+ <strong>Chaojie Mao<sup>*&dagger;</sup></strong>
14
+ ·
15
+ <strong>Jingfeng Zhang</strong>
16
+ ·
17
+ <strong>Yulin Pan</strong>
18
+ ·
19
+ <strong>Yu Liu</strong>
20
+ <br>
21
+ <b>Tongyi Lab - <a href="https://github.com/Wan-Video/Wan2.1"><img src='https://ali-vilab.github.io/VACE-Page/assets/logos/wan_logo.png' alt='wan_logo' style='margin-bottom: -4px; height: 20px;'></a> </b>
22
+ <br>
23
+ <br>
24
+ <a href="https://arxiv.org/abs/2503.07598"><img src='https://img.shields.io/badge/arXiv-VACE-red' alt='Paper PDF'></a>
25
+ <a href="https://ali-vilab.github.io/VACE-Page/"><img src='https://img.shields.io/badge/Project_Page-VACE-green' alt='Project Page'></a>
26
+ <a href="https://huggingface.co/ali-vilab/VACE-Wan2.1-1.3B-Preview"><img src='https://img.shields.io/badge/Model-VACE-yellow'></a>
27
+ <a href="https://modelscope.cn/collections/VACE-8fa5fcfd386e43"><img src='https://img.shields.io/badge/VACE-ModelScope-purple'></a>
28
+ <br>
29
+ </p>
30
+
31
+
32
+ ## Introduction
33
+ <strong>VACE</strong> is an all-in-one model designed for video creation and editing. It encompasses various tasks, including reference-to-video generation (<strong>R2V</strong>), video-to-video editing (<strong>V2V</strong>), and masked video-to-video editing (<strong>MV2V</strong>), allowing users to compose these tasks freely. This functionality enables users to explore diverse possibilities and streamlines their workflows effectively, offering a range of capabilities, such as Move-Anything, Swap-Anything, Reference-Anything, Expand-Anything, Animate-Anything, and more.
34
+
35
+ <img src='https://raw.githubusercontent.com/ali-vilab/VACE/refs/heads/main/assets/materials/teaser.jpg'>
36
+
37
+
38
+ ## 🎉 News
39
+ - [x] Mar 31, 2025: 🔥[VACE-Wan2.1-1.3B-Preview](https://huggingface.co/ali-vilab/VACE-Wan2.1-1.3B-Preview) and [VACE-LTX-Video-0.9](https://huggingface.co/ali-vilab/VACE-LTX-Video-0.9) models are now available at HuggingFace and [ModelScope](https://modelscope.cn/collections/VACE-8fa5fcfd386e43)!
40
+ - [x] Mar 31, 2025: 🔥Release code of model inference, preprocessing, and gradio demos.
41
+ - [x] Mar 11, 2025: We propose [VACE](https://ali-vilab.github.io/VACE-Page/), an all-in-one model for video creation and editing.
42
+
43
+
44
+ ## 🪄 Models
45
+ | Models | Download Link | Video Size | License |
46
+ |--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|-----------------------------------------------------------------------------------------------|
47
+ | VACE-Wan2.1-1.3B-Preview | [Huggingface](https://huggingface.co/ali-vilab/VACE-Wan2.1-1.3B-Preview) 🤗 [ModelScope](https://modelscope.cn/models/iic/VACE-Wan2.1-1.3B-Preview) 🤖 | ~ 81 x 480 x 832 | [Apache-2.0](https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B/blob/main/LICENSE.txt) |
48
+ | VACE-Wan2.1-1.3B | [To be released](https://github.com/Wan-Video) <img src='https://ali-vilab.github.io/VACE-Page/assets/logos/wan_logo.png' alt='wan_logo' style='margin-bottom: -4px; height: 15px;'> | ~ 81 x 480 x 832 | [Apache-2.0](https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B/blob/main/LICENSE.txt) |
49
+ | VACE-Wan2.1-14B | [To be released](https://github.com/Wan-Video) <img src='https://ali-vilab.github.io/VACE-Page/assets/logos/wan_logo.png' alt='wan_logo' style='margin-bottom: -4px; height: 15px;'> | ~ 81 x 720 x 1080 | [Apache-2.0](https://huggingface.co/Wan-AI/Wan2.1-T2V-14B/blob/main/LICENSE.txt) |
50
+ | VACE-LTX-Video-0.9 | [Huggingface](https://huggingface.co/ali-vilab/VACE-LTX-Video-0.9) 🤗 [ModelScope](https://modelscope.cn/models/iic/VACE-LTX-Video-0.9) 🤖 | ~ 97 x 512 x 768 | [RAIL-M](https://huggingface.co/Lightricks/LTX-Video/blob/main/ltx-video-2b-v0.9.license.txt) |
51
+
52
+ - The input supports any resolution, but to achieve optimal results, the video size should fall within a specific range.
53
+ - All models inherit the license of the original model.
54
+
55
+
56
+ ## ⚙️ Installation
57
+ The codebase was tested with Python 3.10.13, CUDA version 12.4, and PyTorch >= 2.5.1.
58
+
59
+ ### Setup for Model Inference
60
+ You can setup for VACE model inference by running:
61
+ ```bash
62
+ git clone https://github.com/ali-vilab/VACE.git && cd VACE
63
+ pip install torch==2.5.1 torchvision==0.20.1 --index-url https://download.pytorch.org/whl/cu124 # If PyTorch is not installed.
64
+ pip install -r requirements.txt
65
+ pip install wan@git+https://github.com/Wan-Video/Wan2.1 # If you want to use Wan2.1-based VACE.
66
+ pip install ltx-video@git+https://github.com/Lightricks/LTX-Video@ltx-video-0.9.1 sentencepiece --no-deps # If you want to use LTX-Video-0.9-based VACE. It may conflict with Wan.
67
+ ```
68
+ Please download your preferred base model to `<repo-root>/models/`.
69
+
70
+ ### Setup for Preprocess Tools
71
+ If you need preprocessing tools, please install:
72
+ ```bash
73
+ pip install -r requirements/annotator.txt
74
+ ```
75
+ Please download [VACE-Annotators](https://huggingface.co/ali-vilab/VACE-Annotators) to `<repo-root>/models/`.
76
+
77
+ ### Local Directories Setup
78
+ It is recommended to download [VACE-Benchmark](https://huggingface.co/ali-vilab) to `<repo-root>/benchmarks/` as examples in `run_vace_xxx.sh`.
79
+
80
+ We recommend to organize local directories as:
81
+ ```angular2html
82
+ VACE
83
+ ├── ...
84
+ ├── benchmarks
85
+ │ └── VACE-Benchmark
86
+ │ └── assets
87
+ │ └── examples
88
+ │ ├── animate_anything
89
+ │ │ └── ...
90
+ │ └── ...
91
+ ├── models
92
+ │ ├── VACE-Annotators
93
+ │ │ └── ...
94
+ │ ├── VACE-LTX-Video-0.9
95
+ │ │ └── ...
96
+ │ └── VACE-Wan2.1-1.3B-Preview
97
+ │ └── ...
98
+ └── ...
99
+ ```
100
+
101
+ ## 🚀 Usage
102
+ In VACE, users can input **text prompt** and optional **video**, **mask**, and **image** for video generation or editing.
103
+ Detailed instructions for using VACE can be found in the [User Guide](https://github.com/ali-vilab/VACE/blob/main/UserGuide.md).
104
+
105
+ ### Inference CIL
106
+ #### 1) End-to-End Running
107
+ To simply run VACE without diving into any implementation details, we suggest an end-to-end pipeline. For example:
108
+ ```bash
109
+ # run V2V depth
110
+ python vace/vace_pipeline.py --base wan --task depth --video assets/videos/test.mp4 --prompt 'xxx'
111
+
112
+ # run MV2V inpainting by providing bbox
113
+ python vace/vace_pipeline.py --base wan --task inpainting --mode bbox --bbox 50,50,550,700 --video assets/videos/test.mp4 --prompt 'xxx'
114
+ ```
115
+ This script will run video preprocessing and model inference sequentially,
116
+ and you need to specify all the required args of preprocessing (`--task`, `--mode`, `--bbox`, `--video`, etc.) and inference (`--prompt`, etc.).
117
+ The output video together with intermediate video, mask and images will be saved into `./results/` by default.
118
+
119
+ > 💡**Note**:
120
+ > Please refer to [run_vace_pipeline.sh](https://github.com/ali-vilab/VACE/blob/main/run_vace_pipeline.sh) for usage examples of different task pipelines.
121
+
122
+
123
+ #### 2) Preprocessing
124
+ To have more flexible control over the input, before VACE model inference, user inputs need to be preprocessed into `src_video`, `src_mask`, and `src_ref_images` first.
125
+ We assign each [preprocessor](https://github.com/ali-vilab/VACE/blob/main/vace/configs/__init__.py) a task name, so simply call [`vace_preprocess.py`](https://github.com/ali-vilab/VACE/blob/main/vace/vace_preproccess.py) and specify the task name and task params. For example:
126
+ ```angular2html
127
+ # process video depth
128
+ python vace/vace_preproccess.py --task depth --video assets/videos/test.mp4
129
+
130
+ # process video inpainting by providing bbox
131
+ python vace/vace_preproccess.py --task inpainting --mode bbox --bbox 50,50,550,700 --video assets/videos/test.mp4
132
+ ```
133
+ The outputs will be saved to `./proccessed/` by default.
134
+
135
+ > 💡**Note**:
136
+ > Please refer to [run_vace_pipeline.sh](https://github.com/ali-vilab/VACE/blob/main//run_vace_pipeline.sh) preprocessing methods for different tasks.
137
+ Moreover, refer to [vace/configs/](https://github.com/ali-vilab/VACE/blob/main/vace/configs/) for all the pre-defined tasks and required params.
138
+ You can also customize preprocessors by implementing at [`annotators`](https://github.com/ali-vilab/VACE/blob/main/vace/annotators/__init__.py) and register them at [`configs`](https://github.com/ali-vilab/VACE/blob/main/vace/configs).
139
+
140
+
141
+ #### 3) Model inference
142
+ Using the input data obtained from **Preprocessing**, the model inference process can be performed as follows:
143
+ ```bash
144
+ # For Wan2.1 single GPU inference
145
+ python vace/vace_wan_inference.py --ckpt_dir <path-to-model> --src_video <path-to-src-video> --src_mask <path-to-src-mask> --src_ref_images <paths-to-src-ref-images> --prompt "xxx"
146
+
147
+ # For Wan2.1 Multi GPU Acceleration inference
148
+ pip install "xfuser>=0.4.1"
149
+ torchrun --nproc_per_node=8 vace/vace_wan_inference.py --dit_fsdp --t5_fsdp --ulysses_size 1 --ring_size 8 --ckpt_dir <path-to-model> --src_video <path-to-src-video> --src_mask <path-to-src-mask> --src_ref_images <paths-to-src-ref-images> --prompt "xxx"
150
+
151
+ # For LTX inference, run
152
+ python vace/vace_ltx_inference.py --ckpt_path <path-to-model> --text_encoder_path <path-to-model> --src_video <path-to-src-video> --src_mask <path-to-src-mask> --src_ref_images <paths-to-src-ref-images> --prompt "xxx"
153
+ ```
154
+ The output video together with intermediate video, mask and images will be saved into `./results/` by default.
155
+
156
+ > 💡**Note**:
157
+ > (1) Please refer to [vace/vace_wan_inference.pyhttps://github.com/ali-vilab/VACE/blob/main/vace/vace_wan_inference.py) and [vace/vace_ltx_inference.py](https://github.com/ali-vilab/VACE/blob/main/vace/vace_ltx_inference.py) for the inference args.
158
+ > (2) For LTX-Video and English language Wan2.1 users, you need prompt extension to unlock the full model performance.
159
+ Please follow the [instruction of Wan2.1](https://github.com/Wan-Video/Wan2.1?tab=readme-ov-file#2-using-prompt-extension) and set `--use_prompt_extend` while running inference.
160
+
161
+
162
+ ### Inference Gradio
163
+ For preprocessors, run
164
+ ```bash
165
+ python vace/gradios/preprocess_demo.py
166
+ ```
167
+ For model inference, run
168
+ ```bash
169
+ # For Wan2.1 gradio inference
170
+ python vace/gradios/vace_wan_demo.py
171
+
172
+ # For LTX gradio inference
173
+ python vace/gradios/vace_ltx_demo.py
174
+ ```
175
+
176
+ ## Acknowledgement
177
+
178
+ We are grateful for the following awesome projects, including [Scepter](https://github.com/modelscope/scepter), [Wan](https://github.com/Wan-Video/Wan2.1), and [LTX-Video](https://github.com/Lightricks/LTX-Video).
179
+
180
+
181
+ ## BibTeX
182
+
183
+ ```bibtex
184
+ @article{vace,
185
+ title = {VACE: All-in-One Video Creation and Editing},
186
+ author = {Jiang, Zeyinzi and Han, Zhen and Mao, Chaojie and Zhang, Jingfeng and Pan, Yulin and Liu, Yu},
187
+ journal = {arXiv preprint arXiv:2503.07598},
188
+ year = {2025}
189
+ }