Upload 2 files
Browse files- README.md +235 -198
- requirements.txt +13 -0
README.md
CHANGED
@@ -1,200 +1,237 @@
|
|
1 |
-
|
2 |
-
library_name: diffusers
|
3 |
-
---
|
4 |
-
|
5 |
-
# Model Card for Model ID
|
6 |
-
|
7 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
## Model Details
|
12 |
-
|
13 |
-
### Model Description
|
14 |
-
|
15 |
-
<!-- Provide a longer summary of what this model is. -->
|
16 |
-
|
17 |
-
This is the model card of a 🧨 diffusers model that has been pushed on the Hub. This model card has been automatically generated.
|
18 |
-
|
19 |
-
- **Developed by:** [More Information Needed]
|
20 |
-
- **Funded by [optional]:** [More Information Needed]
|
21 |
-
- **Shared by [optional]:** [More Information Needed]
|
22 |
-
- **Model type:** [More Information Needed]
|
23 |
-
- **Language(s) (NLP):** [More Information Needed]
|
24 |
-
- **License:** [More Information Needed]
|
25 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
26 |
-
|
27 |
-
### Model Sources [optional]
|
28 |
-
|
29 |
-
<!-- Provide the basic links for the model. -->
|
30 |
-
|
31 |
-
- **Repository:** [More Information Needed]
|
32 |
-
- **Paper [optional]:** [More Information Needed]
|
33 |
-
- **Demo [optional]:** [More Information Needed]
|
34 |
-
|
35 |
-
## Uses
|
36 |
-
|
37 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
38 |
-
|
39 |
-
### Direct Use
|
40 |
-
|
41 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
42 |
-
|
43 |
-
[More Information Needed]
|
44 |
-
|
45 |
-
### Downstream Use [optional]
|
46 |
-
|
47 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
48 |
-
|
49 |
-
[More Information Needed]
|
50 |
-
|
51 |
-
### Out-of-Scope Use
|
52 |
-
|
53 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
54 |
-
|
55 |
-
[More Information Needed]
|
56 |
-
|
57 |
-
## Bias, Risks, and Limitations
|
58 |
-
|
59 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
60 |
-
|
61 |
-
[More Information Needed]
|
62 |
-
|
63 |
-
### Recommendations
|
64 |
-
|
65 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
66 |
-
|
67 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
68 |
-
|
69 |
-
## How to Get Started with the Model
|
70 |
-
|
71 |
-
Use the code below to get started with the model.
|
72 |
-
|
73 |
-
[More Information Needed]
|
74 |
-
|
75 |
-
## Training Details
|
76 |
-
|
77 |
-
### Training Data
|
78 |
-
|
79 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
80 |
-
|
81 |
-
[More Information Needed]
|
82 |
-
|
83 |
-
### Training Procedure
|
84 |
-
|
85 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
86 |
-
|
87 |
-
#### Preprocessing [optional]
|
88 |
-
|
89 |
-
[More Information Needed]
|
90 |
-
|
91 |
-
|
92 |
-
#### Training Hyperparameters
|
93 |
-
|
94 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
95 |
-
|
96 |
-
#### Speeds, Sizes, Times [optional]
|
97 |
-
|
98 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
99 |
-
|
100 |
-
[More Information Needed]
|
101 |
-
|
102 |
-
## Evaluation
|
103 |
-
|
104 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
105 |
-
|
106 |
-
### Testing Data, Factors & Metrics
|
107 |
-
|
108 |
-
#### Testing Data
|
109 |
-
|
110 |
-
<!-- This should link to a Dataset Card if possible. -->
|
111 |
-
|
112 |
-
[More Information Needed]
|
113 |
-
|
114 |
-
#### Factors
|
115 |
-
|
116 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
117 |
-
|
118 |
-
[More Information Needed]
|
119 |
-
|
120 |
-
#### Metrics
|
121 |
-
|
122 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
123 |
-
|
124 |
-
[More Information Needed]
|
125 |
-
|
126 |
-
### Results
|
127 |
-
|
128 |
-
[More Information Needed]
|
129 |
-
|
130 |
-
#### Summary
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
## Model Examination [optional]
|
135 |
-
|
136 |
-
<!-- Relevant interpretability work for the model goes here -->
|
137 |
-
|
138 |
-
[More Information Needed]
|
139 |
-
|
140 |
-
## Environmental Impact
|
141 |
-
|
142 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
143 |
-
|
144 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
145 |
-
|
146 |
-
- **Hardware Type:** [More Information Needed]
|
147 |
-
- **Hours used:** [More Information Needed]
|
148 |
-
- **Cloud Provider:** [More Information Needed]
|
149 |
-
- **Compute Region:** [More Information Needed]
|
150 |
-
- **Carbon Emitted:** [More Information Needed]
|
151 |
-
|
152 |
-
## Technical Specifications [optional]
|
153 |
-
|
154 |
-
### Model Architecture and Objective
|
155 |
-
|
156 |
-
[More Information Needed]
|
157 |
-
|
158 |
-
### Compute Infrastructure
|
159 |
-
|
160 |
-
[More Information Needed]
|
161 |
-
|
162 |
-
#### Hardware
|
163 |
-
|
164 |
-
[More Information Needed]
|
165 |
-
|
166 |
-
#### Software
|
167 |
-
|
168 |
-
[More Information Needed]
|
169 |
-
|
170 |
-
## Citation [optional]
|
171 |
-
|
172 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
173 |
-
|
174 |
-
**BibTeX:**
|
175 |
-
|
176 |
-
[More Information Needed]
|
177 |
-
|
178 |
-
**APA:**
|
179 |
-
|
180 |
-
[More Information Needed]
|
181 |
-
|
182 |
-
## Glossary [optional]
|
183 |
-
|
184 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
185 |
-
|
186 |
-
[More Information Needed]
|
187 |
-
|
188 |
-
## More Information [optional]
|
189 |
-
|
190 |
-
[More Information Needed]
|
191 |
-
|
192 |
-
## Model Card Authors [optional]
|
193 |
-
|
194 |
-
[More Information Needed]
|
195 |
-
|
196 |
-
## Model Card Contact
|
197 |
-
|
198 |
-
[More Information Needed]
|
199 |
|
|
|
200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Tune-A-Video
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
+
This repository is the official implementation of [Tune-A-Video](https://arxiv.org/abs/2212.11565).
|
4 |
|
5 |
+
**[Tune-A-Video: One-Shot Tuning of Image Diffusion Models for Text-to-Video Generation](https://arxiv.org/abs/2212.11565)**
|
6 |
+
<br/>
|
7 |
+
[Jay Zhangjie Wu](https://zhangjiewu.github.io/),
|
8 |
+
[Yixiao Ge](https://geyixiao.com/),
|
9 |
+
[Xintao Wang](https://xinntao.github.io/),
|
10 |
+
[Stan Weixian Lei](),
|
11 |
+
[Yuchao Gu](https://ycgu.site/),
|
12 |
+
[Yufei Shi](),
|
13 |
+
[Wynne Hsu](https://www.comp.nus.edu.sg/~whsu/),
|
14 |
+
[Ying Shan](https://scholar.google.com/citations?user=4oXBp9UAAAAJ&hl=en),
|
15 |
+
[Xiaohu Qie](https://scholar.google.com/citations?user=mk-F69UAAAAJ&hl=en),
|
16 |
+
[Mike Zheng Shou](https://sites.google.com/view/showlab)
|
17 |
+
<br/>
|
18 |
+
|
19 |
+
[![Project Website](https://img.shields.io/badge/Project-Website-orange)](https://tuneavideo.github.io/)
|
20 |
+
[![arXiv](https://img.shields.io/badge/arXiv-2212.11565-b31b1b.svg)](https://arxiv.org/abs/2212.11565)
|
21 |
+
[![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/Tune-A-Video-library/Tune-A-Video-Training-UI)
|
22 |
+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/showlab/Tune-A-Video/blob/main/notebooks/Tune-A-Video.ipynb)
|
23 |
+
|
24 |
+
|
25 |
+
<p align="center">
|
26 |
+
<img src="https://tuneavideo.github.io/assets/teaser.gif" width="1080px"/>
|
27 |
+
<br>
|
28 |
+
<em>Given a video-text pair as input, our method, Tune-A-Video, fine-tunes a pre-trained text-to-image diffusion model for text-to-video generation.</em>
|
29 |
+
</p>
|
30 |
+
|
31 |
+
## News
|
32 |
+
### 🚨 Announcing [LOVEU-TGVE](https://sites.google.com/view/loveucvpr23/track4): A CVPR competition for AI-based video editing! Submissions due Jun 5. Don't miss out! 🤩
|
33 |
+
- [02/22/2023] Improved consistency using DDIM inversion.
|
34 |
+
- [02/08/2023] [Colab demo](https://colab.research.google.com/github/showlab/Tune-A-Video/blob/main/notebooks/Tune-A-Video.ipynb) released!
|
35 |
+
- [02/03/2023] Pre-trained Tune-A-Video models are available on [Hugging Face Library](https://huggingface.co/Tune-A-Video-library)!
|
36 |
+
- [01/28/2023] New Feature: tune a video on personalized [DreamBooth](https://dreambooth.github.io/) models.
|
37 |
+
- [01/28/2023] Code released!
|
38 |
+
|
39 |
+
## Setup
|
40 |
+
|
41 |
+
### Requirements
|
42 |
+
|
43 |
+
```shell
|
44 |
+
pip install -r requirements.txt
|
45 |
+
```
|
46 |
+
|
47 |
+
Installing [xformers](https://github.com/facebookresearch/xformers) is highly recommended for more efficiency and speed on GPUs.
|
48 |
+
To enable xformers, set `enable_xformers_memory_efficient_attention=True` (default).
|
49 |
+
|
50 |
+
### Weights
|
51 |
+
|
52 |
+
**[Stable Diffusion]** [Stable Diffusion](https://arxiv.org/abs/2112.10752) is a latent text-to-image diffusion model capable of generating photo-realistic images given any text input. The pre-trained Stable Diffusion models can be downloaded from Hugging Face (e.g., [Stable Diffusion v1-4](https://huggingface.co/CompVis/stable-diffusion-v1-4), [v2-1](https://huggingface.co/stabilityai/stable-diffusion-2-1)). You can also use fine-tuned Stable Diffusion models trained on different styles (e.g, [Modern Disney](https://huggingface.co/nitrosocke/mo-di-diffusion), [Anything V4.0](https://huggingface.co/andite/anything-v4.0), [Redshift](https://huggingface.co/nitrosocke/redshift-diffusion), etc.).
|
53 |
+
|
54 |
+
**[DreamBooth]** [DreamBooth](https://dreambooth.github.io/) is a method to personalize text-to-image models like Stable Diffusion given just a few images (3~5 images) of a subject. Tuning a video on DreamBooth models allows personalized text-to-video generation of a specific subject. There are some public DreamBooth models available on [Hugging Face](https://huggingface.co/sd-dreambooth-library) (e.g., [mr-potato-head](https://huggingface.co/sd-dreambooth-library/mr-potato-head)). You can also train your own DreamBooth model following [this training example](https://github.com/huggingface/diffusers/tree/main/examples/dreambooth).
|
55 |
+
|
56 |
+
|
57 |
+
## Usage
|
58 |
+
|
59 |
+
### Training
|
60 |
+
|
61 |
+
To fine-tune the text-to-image diffusion models for text-to-video generation, run this command:
|
62 |
+
|
63 |
+
```bash
|
64 |
+
accelerate launch train_tuneavideo.py --config="configs/man-skiing.yaml"
|
65 |
+
```
|
66 |
+
|
67 |
+
Note: Tuning a 24-frame video usually takes `300~500` steps, about `10~15` minutes using one A100 GPU.
|
68 |
+
Reduce `n_sample_frames` if your GPU memory is limited.
|
69 |
+
|
70 |
+
### Inference
|
71 |
+
|
72 |
+
Once the training is done, run inference:
|
73 |
+
|
74 |
+
```python
|
75 |
+
from tuneavideo.pipelines.pipeline_tuneavideo import TuneAVideoPipeline
|
76 |
+
from tuneavideo.models.unet import UNet3DConditionModel
|
77 |
+
from tuneavideo.util import save_videos_grid
|
78 |
+
import torch
|
79 |
+
|
80 |
+
pretrained_model_path = "./checkpoints/stable-diffusion-v1-4"
|
81 |
+
my_model_path = "./outputs/man-skiing"
|
82 |
+
unet = UNet3DConditionModel.from_pretrained(my_model_path, subfolder='unet', torch_dtype=torch.float16).to('cuda')
|
83 |
+
pipe = TuneAVideoPipeline.from_pretrained(pretrained_model_path, unet=unet, torch_dtype=torch.float16).to("cuda")
|
84 |
+
pipe.enable_xformers_memory_efficient_attention()
|
85 |
+
pipe.enable_vae_slicing()
|
86 |
+
|
87 |
+
prompt = "spider man is skiing"
|
88 |
+
ddim_inv_latent = torch.load(f"{my_model_path}/inv_latents/ddim_latent-500.pt").to(torch.float16)
|
89 |
+
video = pipe(prompt, latents=ddim_inv_latent, video_length=24, height=512, width=512, num_inference_steps=50, guidance_scale=12.5).videos
|
90 |
+
|
91 |
+
save_videos_grid(video, f"./{prompt}.gif")
|
92 |
+
```
|
93 |
+
|
94 |
+
## Results
|
95 |
+
|
96 |
+
### Pretrained T2I (Stable Diffusion)
|
97 |
+
<table class="center">
|
98 |
+
<tr>
|
99 |
+
<td style="text-align:center;"><b>Input Video</b></td>
|
100 |
+
<td style="text-align:center;" colspan="3"><b>Output Video</b></td>
|
101 |
+
</tr>
|
102 |
+
<tr>
|
103 |
+
<td><img src="https://tuneavideo.github.io/assets/data/man-skiing.gif"></td>
|
104 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/man-skiing/spiderman-beach.gif"></td>
|
105 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/man-skiing/wonder-woman.gif"></td>
|
106 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/man-skiing/pink-sunset.gif"></td>
|
107 |
+
</tr>
|
108 |
+
<tr>
|
109 |
+
<td width=25% style="text-align:center;color:gray;">"A man is skiing"</td>
|
110 |
+
<td width=25% style="text-align:center;">"Spider Man is skiing on the beach, cartoon style”</td>
|
111 |
+
<td width=25% style="text-align:center;">"Wonder Woman, wearing a cowboy hat, is skiing"</td>
|
112 |
+
<td width=25% style="text-align:center;">"A man, wearing pink clothes, is skiing at sunset"</td>
|
113 |
+
</tr>
|
114 |
+
|
115 |
+
<tr>
|
116 |
+
<td><img src="https://tuneavideo.github.io/assets/data/rabbit-watermelon.gif"></td>
|
117 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/rabbit-watermelon/rabbit.gif"></td>
|
118 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/rabbit-watermelon/cat.gif"></td>
|
119 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/rabbit-watermelon/puppy.gif"></td>
|
120 |
+
</tr>
|
121 |
+
<tr>
|
122 |
+
<td width=25% style="text-align:center;color:gray;">"A rabbit is eating a watermelon on the table"</td>
|
123 |
+
<td width=25% style="text-align:center;">"A rabbit is <del>eating a watermelon</del> on the table"</td>
|
124 |
+
<td width=25% style="text-align:center;">"A cat with sunglasses is eating a watermelon on the beach"</td>
|
125 |
+
<td width=25% style="text-align:center;">"A puppy is eating a cheeseburger on the table, comic style"</td>
|
126 |
+
</tr>
|
127 |
+
|
128 |
+
<tr>
|
129 |
+
<td><img src="https://tuneavideo.github.io/assets/data/car-turn.gif"></td>
|
130 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/car-turn/porsche-beach.gif"></td>
|
131 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/car-turn/car-cartoon.gif"></td>
|
132 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/car-turn/car-snow.gif"></td>
|
133 |
+
</tr>
|
134 |
+
<tr>
|
135 |
+
<td width=25% style="text-align:center;color:gray;">"A jeep car is moving on the road"</td>
|
136 |
+
<td width=25% style="text-align:center;">"A Porsche car is moving on the beach"</td>
|
137 |
+
<td width=25% style="text-align:center;">"A car is moving on the road, cartoon style"</td>
|
138 |
+
<td width=25% style="text-align:center;">"A car is moving on the snow"</td>
|
139 |
+
</tr>
|
140 |
+
|
141 |
+
<tr>
|
142 |
+
<td><img src="https://tuneavideo.github.io/assets/data/man-basketball.gif"></td>
|
143 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/man-basketball/bond.gif"></td>
|
144 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/man-basketball/astronaut.gif"></td>
|
145 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/man-basketball/lego.gif"></td>
|
146 |
+
</tr>
|
147 |
+
<tr>
|
148 |
+
<td width=25% style="text-align:center;color:gray;">"A man is dribbling a basketball"</td>
|
149 |
+
<td width=25% style="text-align:center;">"James Bond is dribbling a basketball on the beach"</td>
|
150 |
+
<td width=25% style="text-align:center;">"An astronaut is dribbling a basketball, cartoon style"</td>
|
151 |
+
<td width=25% style="text-align:center;">"A lego man in a black suit is dribbling a basketball"</td>
|
152 |
+
</tr>
|
153 |
+
</table>
|
154 |
+
|
155 |
+
### Pretrained T2I (personalized DreamBooth)
|
156 |
+
|
157 |
+
<a href="https://huggingface.co/andite/anything-v4.0"><img src="https://tuneavideo.github.io/assets/results/tuneavideo/anything-v4/anything-v4.png" width="240px"/></a>
|
158 |
+
|
159 |
+
<table class="center">
|
160 |
+
<tr>
|
161 |
+
<td style="text-align:center;"><b>Input Video</b></td>
|
162 |
+
<td style="text-align:center;" colspan="3"><b>Output Video</b></td>
|
163 |
+
</tr>
|
164 |
+
<tr>
|
165 |
+
<td><img src="https://tuneavideo.github.io/assets/data/bear-guitar.gif"></td>
|
166 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/anything-v4/bear-guitar/1girl-streets.gif"></td>
|
167 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/anything-v4/bear-guitar/1boy-indoor.gif"></td>
|
168 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/anything-v4/bear-guitar/1girl-beach.gif"></td>
|
169 |
+
</tr>
|
170 |
+
<tr>
|
171 |
+
<td width=25% style="text-align:center;color:gray;">"A bear is playing guitar"</td>
|
172 |
+
<td width=25% style="text-align:center;">"1girl is playing guitar, white hair, medium hair, cat ears, closed eyes, cute, scarf, jacket, outdoors, streets"</td>
|
173 |
+
<td width=25% style="text-align:center;">"1boy is playing guitar, bishounen, casual, indoors, sitting, coffee shop, bokeh"</td>
|
174 |
+
<td width=25% style="text-align:center;">"1girl is playing guitar, red hair, long hair, beautiful eyes, looking at viewer, cute, dress, beach, sea"</td>
|
175 |
+
</tr>
|
176 |
+
</table>
|
177 |
+
|
178 |
+
|
179 |
+
<a href="https://huggingface.co/nitrosocke/mo-di-diffusion"><img src="https://tuneavideo.github.io/assets/results/tuneavideo/modern-disney/modern-disney.png" width="240px"/></a>
|
180 |
+
|
181 |
+
<table class="center">
|
182 |
+
<tr>
|
183 |
+
<td style="text-align:center;"><b>Input Video</b></td>
|
184 |
+
<td style="text-align:center;" colspan="3"><b>Output Video</b></td>
|
185 |
+
</tr>
|
186 |
+
<tr>
|
187 |
+
<td><img src="https://tuneavideo.github.io/assets/data/bear-guitar.gif"></td>
|
188 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/modern-disney/bear-guitar/rabbit.gif"></td>
|
189 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/modern-disney/bear-guitar/prince.gif"></td>
|
190 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/modern-disney/bear-guitar/princess.gif"></td>
|
191 |
+
</tr>
|
192 |
+
<tr>
|
193 |
+
<td width=25% style="text-align:center;color:gray;">"A bear is playing guitar"</td>
|
194 |
+
<td width=25% style="text-align:center;">"A rabbit is playing guitar, modern disney style"</td>
|
195 |
+
<td width=25% style="text-align:center;">"A handsome prince is playing guitar, modern disney style"</td>
|
196 |
+
<td width=25% style="text-align:center;">"A magic princess with sunglasses is playing guitar on the stage, modern disney style"</td>
|
197 |
+
</tr>
|
198 |
+
</table>
|
199 |
+
|
200 |
+
<a href="https://huggingface.co/sd-dreambooth-library/mr-potato-head"><img src="https://tuneavideo.github.io/assets/results/tuneavideo/mr-potato-head/mr-potato-head.png" width="240px"/></a>
|
201 |
+
|
202 |
+
<table class="center">
|
203 |
+
<tr>
|
204 |
+
<td style="text-align:center;"><b>Input Video</b></td>
|
205 |
+
<td style="text-align:center;" colspan="3"><b>Output Video</b></td>
|
206 |
+
</tr>
|
207 |
+
<tr>
|
208 |
+
<td><img src="https://tuneavideo.github.io/assets/data/bear-guitar.gif"></td>
|
209 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/mr-potato-head/bear-guitar/lego-snow.gif"></td>
|
210 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/mr-potato-head/bear-guitar/sunglasses-beach.gif"></td>
|
211 |
+
<td><img src="https://tuneavideo.github.io/assets/results/tuneavideo/mr-potato-head/bear-guitar/van-gogh.gif"></td>
|
212 |
+
</tr>
|
213 |
+
<tr>
|
214 |
+
<td width=25% style="text-align:center;color:gray;">"A bear is playing guitar"</td>
|
215 |
+
<td width=25% style="text-align:center;">"Mr Potato Head, made of lego, is playing guitar on the snow"</td>
|
216 |
+
<td width=25% style="text-align:center;">"Mr Potato Head, wearing sunglasses, is playing guitar on the beach"</td>
|
217 |
+
<td width=25% style="text-align:center;">"Mr Potato Head is playing guitar in the starry night, Van Gogh style"</td>
|
218 |
+
</tr>
|
219 |
+
</table>
|
220 |
+
|
221 |
+
|
222 |
+
## Citation
|
223 |
+
If you make use of our work, please cite our paper.
|
224 |
+
```bibtex
|
225 |
+
@inproceedings{wu2023tune,
|
226 |
+
title={Tune-a-video: One-shot tuning of image diffusion models for text-to-video generation},
|
227 |
+
author={Wu, Jay Zhangjie and Ge, Yixiao and Wang, Xintao and Lei, Stan Weixian and Gu, Yuchao and Shi, Yufei and Hsu, Wynne and Shan, Ying and Qie, Xiaohu and Shou, Mike Zheng},
|
228 |
+
booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
|
229 |
+
pages={7623--7633},
|
230 |
+
year={2023}
|
231 |
+
}
|
232 |
+
```
|
233 |
+
|
234 |
+
## Shoutouts
|
235 |
+
|
236 |
+
- This code builds on [diffusers](https://github.com/huggingface/diffusers). Thanks for open-sourcing!
|
237 |
+
- Thanks [hysts](https://github.com/hysts) for the awesome [gradio demo](https://huggingface.co/spaces/Tune-A-Video-library/Tune-A-Video-Training-UI).
|
requirements.txt
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
torch==1.12.1
|
2 |
+
torchvision==0.13.1
|
3 |
+
diffusers[torch]==0.11.1
|
4 |
+
transformers>=4.25.1
|
5 |
+
bitsandbytes==0.35.4
|
6 |
+
decord==0.6.0
|
7 |
+
accelerate
|
8 |
+
tensorboard
|
9 |
+
modelcards
|
10 |
+
omegaconf
|
11 |
+
einops
|
12 |
+
imageio
|
13 |
+
ftfy
|