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
|
1 |
+
# Vlogger
|
2 |
+
[![arXiv](https://img.shields.io/badge/arXiv-2310.20700-b31b1b.svg)](https://arxiv.org/abs/2310.20700)
|
3 |
+
[![Project Page](https://img.shields.io/badge/Vlogger-Website-green)](https://zhuangshaobin.github.io/Vlogger.github.io/)
|
4 |
+
[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FVchitect%2FSEINE&count_bg=%23F59352&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=visitors&edge_flat=false)](https://hits.seeyoufarm.com)
|
5 |
+
|
6 |
+
This repository is the official implementation of [Vlogger](https://arxiv.org/abs/2310.20700):
|
7 |
+
|
8 |
+
**[Vlogger: Make Your Dream A Vlog](https://arxiv.org/abs/2310.20700)**
|
9 |
+
|
10 |
+
Demo generated by our Vlogger: [Teddy Travel](https://youtu.be/ZRD1-jHbEGk)
|
11 |
+
|
12 |
+
|
13 |
+
Below is the compressed version of [Teddy Travel](https://youtu.be/ZRD1-jHbEGk).
|
14 |
+
|
15 |
+
|
16 |
+
https://github.com/zhuangshaobin/Vlogger/assets/94739615/1e8dd246-d3b9-49e9-8eee-d40b6d8523b9
|
17 |
+
|
18 |
+
|
19 |
+
## Setup
|
20 |
+
|
21 |
+
### Prepare Environment
|
22 |
+
```
|
23 |
+
conda create -n vlogger python==3.10.11
|
24 |
+
conda activate vlogger
|
25 |
+
pip install -r requirements.txt
|
26 |
+
```
|
27 |
+
|
28 |
+
### Download our model and T2I base model
|
29 |
+
|
30 |
+
Our model is based on Stable diffusion v1.4, you may download [Stable Diffusion v1-4](https://huggingface.co/CompVis/stable-diffusion-v1-4) and [OpenCLIP-ViT-H-14](https://huggingface.co/laion/CLIP-ViT-H-14-laion2B-s32B-b79K) to the director of ``` pretrained ```
|
31 |
+
.
|
32 |
+
Download our model(ShowMaker) checkpoint (from [google drive](https://drive.google.com/file/d/1pAH73kz2QRfD2Dxk4lL3SrHvLAlWcPI3/view?usp=drive_link) or [hugging face](https://huggingface.co/GrayShine/Vlogger/tree/main)) and save to the directory of ```pretrained```
|
33 |
+
|
34 |
+
|
35 |
+
Now under `./pretrained`, you should be able to see the following:
|
36 |
+
```
|
37 |
+
βββ pretrained
|
38 |
+
β βββ ShowMaker.pt
|
39 |
+
β βββ stable-diffusion-v1-4
|
40 |
+
β βββ OpenCLIP-ViT-H-14
|
41 |
+
β β βββ ...
|
42 |
+
βββ βββ βββ ...
|
43 |
+
βββ ...
|
44 |
+
```
|
45 |
+
## Usage
|
46 |
+
### Inference for (T+I)2V
|
47 |
+
Run the following command to get the (T+I)2V results:
|
48 |
+
```python
|
49 |
+
python sample_scripts/with_mask_sample.py
|
50 |
+
```
|
51 |
+
The generated video will be saved in ```results/mask_no_ref```.
|
52 |
+
### Inference for (T+I+ref)2V
|
53 |
+
Run the following command to get the (T+I+ref)2V results:
|
54 |
+
```python
|
55 |
+
python sample_scripts/with_mask_ref_sample.py
|
56 |
+
```
|
57 |
+
The generated video will be saved in ```results/mask_ref```.
|
58 |
+
### Inference for LLM planning and make reference image
|
59 |
+
Run the following command to get script, actors and protagonist:
|
60 |
+
```python
|
61 |
+
python sample_scripts/vlog_write_script.py
|
62 |
+
```
|
63 |
+
The generated scripts will be saved in ```results/vlog/$your_story_dir/script```.
|
64 |
+
|
65 |
+
The generated reference images will be saved in ```results/vlog/$your_story_dir/img```.
|
66 |
+
|
67 |
+
!!!important: Enter your openai key in the 7th line of the file ```vlogger/planning_utils/gpt4_utils.py```
|
68 |
+
### Inference for vlog generation
|
69 |
+
Run the following command to get the vlog:
|
70 |
+
```python
|
71 |
+
python sample_scripts/vlog_read_script_sample.py
|
72 |
+
```
|
73 |
+
The generated scripts will be saved in ```results/vlog/$your_story_dir/video```.
|
74 |
+
|
75 |
+
|
76 |
+
#### More Details
|
77 |
+
You may modify ```configs/with_mask_sample.yaml``` to change the (T+I)2V conditions.
|
78 |
+
|
79 |
+
You may modify ```configs/with_mask_ref_sample.yaml``` to change the (T+I+ref)2V conditions.
|
80 |
+
For example:
|
81 |
+
|
82 |
+
```ckpt``` is used to specify a model checkpoint.
|
83 |
+
|
84 |
+
```text_prompt``` is used to describe the content of the video.
|
85 |
+
|
86 |
+
```input_path``` is used to specify the path to the image.
|
87 |
+
|
88 |
+
```ref_path``` is used to specify the path to the reference image.
|
89 |
+
|
90 |
+
```save_path``` is used to specify the path to the generated video.
|
91 |
+
|
92 |
+
|
93 |
+
## Results
|
94 |
+
### (T+I)2V Results
|
95 |
+
<table class="center">
|
96 |
+
<tr>
|
97 |
+
<td style="text-align:center;width: 50%" colspan="1"><b>Input Image</b></td>
|
98 |
+
<td style="text-align:center;width: 50%" colspan="1"><b>Output Video</b></td>
|
99 |
+
</tr>
|
100 |
+
<tr>
|
101 |
+
<td><img src="input/i2v/Underwater_environment_cosmetic_bottles.png" width="400"></td>
|
102 |
+
<td>
|
103 |
+
<img src="examples/TI2V/Underwater_environment_cosmetic_bottles.gif" width="400">
|
104 |
+
<br>
|
105 |
+
<div class="text" style=" text-align:center;">
|
106 |
+
Underwater environment cosmetic bottles.
|
107 |
+
</div>
|
108 |
+
</td>
|
109 |
+
</tr>
|
110 |
+
|
111 |
+
<tr>
|
112 |
+
<td><img src="input/i2v/A_big_drop_of_water_falls_on_a_rose_petal.png" width="400"></td>
|
113 |
+
<td>
|
114 |
+
<img src="examples/TI2V/A_big_drop_of_water_falls_on_a_rose_petal.gif" width="400">
|
115 |
+
<br>
|
116 |
+
<div class="text" style=" text-align:center;">
|
117 |
+
A big drop of water falls on a rose petal.
|
118 |
+
</div>
|
119 |
+
</td>
|
120 |
+
</tr>
|
121 |
+
|
122 |
+
<tr>
|
123 |
+
<td><img src="input/i2v/A_fish_swims_past_an_oriental_woman.png" width="400"></td>
|
124 |
+
<td>
|
125 |
+
<img src="examples/TI2V/A_fish_swims_past_an_oriental_woman.gif" width="400">
|
126 |
+
<br>
|
127 |
+
<div class="text" style=" text-align:center;">
|
128 |
+
A fish swims past an oriental woman.
|
129 |
+
</div>
|
130 |
+
</td>
|
131 |
+
</tr>
|
132 |
+
|
133 |
+
<tr>
|
134 |
+
<td><img src="input/i2v/Cinematic_photograph_View_of_piloting_aaero.png" width="400"></td>
|
135 |
+
<td>
|
136 |
+
<img src="examples/TI2V/Cinematic_photograph_View_of_piloting_aaero.gif" width="400">
|
137 |
+
<br>
|
138 |
+
<div class="text" style=" text-align:center;">
|
139 |
+
Cinematic photograph. View of piloting aaero.
|
140 |
+
</div>
|
141 |
+
</td>
|
142 |
+
</tr>
|
143 |
+
|
144 |
+
<tr>
|
145 |
+
<td><img src="input/i2v/Planet_hits_earth.png" width="400"></td>
|
146 |
+
<td>
|
147 |
+
<img src="examples/TI2V/Planet_hits_earth.gif" width="400">
|
148 |
+
<br>
|
149 |
+
<div class="text" style=" text-align:center;">
|
150 |
+
Planet hits earth.
|
151 |
+
</div>
|
152 |
+
</td>
|
153 |
+
</tr>
|
154 |
+
</table>
|
155 |
+
|
156 |
+
|
157 |
+
### T2V Results
|
158 |
+
<table>
|
159 |
+
<tr>
|
160 |
+
<td style="text-align:center;width: 66%" colspan="2"><b>Output Video</b></td>
|
161 |
+
</tr>
|
162 |
+
<tr>
|
163 |
+
<td>
|
164 |
+
<img src="examples/T2V/A_deer_looks_at_the_sunset_behind_him.gif"/>
|
165 |
+
<br>
|
166 |
+
<div class="text" style=" text-align:center;">
|
167 |
+
A deer looks at the sunset behind him.
|
168 |
+
</div>
|
169 |
+
</td>
|
170 |
+
<td>
|
171 |
+
<img src="examples/T2V/A_duck_is_teaching_math_to_another_duck.gif"/>
|
172 |
+
<br>
|
173 |
+
<div class="text" style=" text-align:center;">
|
174 |
+
A duck is teaching math to another duck.
|
175 |
+
</div>
|
176 |
+
</td>
|
177 |
+
</tr>
|
178 |
+
<tr>
|
179 |
+
<td>
|
180 |
+
<img src="examples/T2V/Bezos_explores_tropical_rainforest.gif"/>
|
181 |
+
<br>
|
182 |
+
<div class="text" style=" text-align:center;">
|
183 |
+
Bezos explores tropical rainforest.
|
184 |
+
</div>
|
185 |
+
</td>
|
186 |
+
<td>
|
187 |
+
<img src="examples/T2V/Light_blue_water_lapping_on_the_beach.gif"/>
|
188 |
+
<br>
|
189 |
+
<div class="text" style=" text-align:center;">
|
190 |
+
A deer looks at the sunset behind him.
|
191 |
+
</div>
|
192 |
+
</td>
|
193 |
+
</tr>
|
194 |
+
|
195 |
+
</table>
|
196 |
+
|
197 |
+
## BibTeX
|
198 |
+
```bibtex
|
199 |
+
@article{zhuang2024vlogger,
|
200 |
+
title={Vlogger: Make Your Dream A Vlog},
|
201 |
+
author={Zhuang, Shaobin and Li, Kunchang and Chen, Xinyuan and Wang, Yaohui and Liu, Ziwei and Qiao, Yu and Wang, Yali},
|
202 |
+
journal={arXiv preprint arXiv:2310.20700},
|
203 |
+
year={2024}
|
204 |
+
}
|
205 |
+
```
|
206 |
+
|
207 |
+
```bibtex
|
208 |
+
@article{chen2023seine,
|
209 |
+
title={SEINE: Short-to-Long Video Diffusion Model for Generative Transition and Prediction},
|
210 |
+
author={Chen, Xinyuan and Wang, Yaohui and Zhang, Lingjun and Zhuang, Shaobin and Ma, Xin and Yu, Jiashuo and Wang, Yali and Lin, Dahua and Qiao, Yu and Liu, Ziwei},
|
211 |
+
journal={arXiv preprint arXiv:2310.20700},
|
212 |
+
year={2023}
|
213 |
+
}
|
214 |
+
```
|
215 |
+
|
216 |
+
```bibtex
|
217 |
+
@article{wang2023lavie,
|
218 |
+
title={LAVIE: High-Quality Video Generation with Cascaded Latent Diffusion Models},
|
219 |
+
author={Wang, Yaohui and Chen, Xinyuan and Ma, Xin and Zhou, Shangchen and Huang, Ziqi and Wang, Yi and Yang, Ceyuan and He, Yinan and Yu, Jiashuo and Yang, Peiqing and others},
|
220 |
+
journal={arXiv preprint arXiv:2309.15103},
|
221 |
+
year={2023}
|
222 |
+
}
|
223 |
+
```
|
224 |
+
|
225 |
+
## Disclaimer
|
226 |
+
We disclaim responsibility for user-generated content. The model was not trained to realistically represent people or events, so using it to generate such content is beyond the model's capabilities. It is prohibited for pornographic, violent and bloody content generation, and to generate content that is demeaning or harmful to people or their environment, culture, religion, etc. Users are solely liable for their actions. The project contributors are not legally affiliated with, nor accountable for users' behaviors. Use the generative model responsibly, adhering to ethical and legal standards.
|
227 |
+
|
228 |
+
## Contact Us
|
229 |
+
**Shaobin Zhuang**: [zhuangshaobin@pjlab.org.cn](mailto:zhuangshaobin@pjlab.org.cn)
|
230 |
+
|
231 |
+
**Kunchang Li**: [likunchang@pjlab.org.cn](mailto:likunchang@pjlab.org.cn)
|
232 |
+
|
233 |
+
**Xinyuan Chen**: [chenxinyuan@pjlab.org.cn](mailto:chenxinyuan@pjlab.org.cn)
|
234 |
+
|
235 |
+
**Yaohui Wang**: [wangyaohui@pjlab.org.cn](mailto:wangyaohui@pjlab.org.cn)
|
236 |
+
|
237 |
+
## Acknowledgements
|
238 |
+
The code is built upon [SEINE](https://github.com/Vchitect/SEINE), [LaVie](https://github.com/Vchitect/LaVie), [diffusers](https://github.com/huggingface/diffusers) and [Stable Diffusion](https://github.com/CompVis/stable-diffusion), we thank all the contributors for open-sourcing.
|
239 |
+
|
240 |
+
|
241 |
+
## License
|
242 |
+
The code is licensed under Apache-2.0, model weights are fully open for academic research and also allow **free** commercial usage. To apply for a commercial license, please contact zhuangshaobin@pjlab.org.cn.
|
243 |
+
=======
|