tingsong lu 36e739b7c1 feat: add lora-script | 1 jaar geleden | |
---|---|---|
.ipynb_checkpoints | 1 jaar geleden | |
__assets__ | 1 jaar geleden | |
animatediff | 1 jaar geleden | |
configs | 1 jaar geleden | |
download_bashscripts | 1 jaar geleden | |
scripts | 1 jaar geleden | |
.gitignore | 1 jaar geleden | |
LICENSE.txt | 1 jaar geleden | |
README.md | 1 jaar geleden | |
app.py | 1 jaar geleden | |
environment.yaml | 1 jaar geleden | |
test_train.py | 1 jaar geleden | |
train.py | 1 jaar geleden |
This repository is the official implementation of AnimateDiff.
AnimateDiff: Animate Your Personalized Text-to-Image Diffusion Models without Specific Tuning
Yuwei Guo, Ceyuan Yang*, Anyi Rao, Yaohui Wang, Yu Qiao, Dahua Lin, Bo Dai*Corresponding Author
One with better controllability and quality is coming soon. Stay tuned.
<tr style="line-height: 0">
<td width=50% style="border: none; text-align: center">Original SDXL</td>
<td width=30% style="border: none; text-align: center">Personalized SDXL</td>
<td width=20% style="border: none; text-align: center">Personalized SDXL</td>
</tr>
<tr>
<td width=50% style="border: none"><img src="__assets__/animations/motion_xl/01.gif"></td>
<td width=30% style="border: none"><img src="__assets__/animations/motion_xl/02.gif"></td>
<td width=20% style="border: none"><img src="__assets__/animations/motion_xl/03.gif"></td>
</tr>
[2023/09/25] Release MotionLoRA and its model zoo, enabling camera movement controls! Please download the MotionLoRA models (74 MB per model, available at Google Drive / HuggingFace / CivitAI ) and save them to the models/MotionLoRA
folder. Example:
python -m scripts.animate --config configs/prompts/v2/5-RealisticVision-MotionLoRA.yaml
Zoom In | Zoom Out | Zoom Pan Left | Zoom Pan Right | ||||
Tilt Up | Tilt Down | Rolling Anti-Clockwise | Rolling Clockwise | ||||
[2023/09/10] New Motion Module release! mm_sd_v15_v2.ckpt
was trained on larger resolution & batch size, and gains noticeable quality improvements. Check it out at Google Drive / HuggingFace / CivitAI and use it with configs/inference/inference-v2.yaml
. Example:
python -m scripts.animate --config configs/prompts/v2/5-RealisticVision.yaml
Here is a qualitative comparison between mm_sd_v15.ckpt
(left) and mm_sd_v15_v2.ckpt
(right):
GPU Memory Optimization, ~12GB VRAM to inference
User Interface developed by community:
We also create a Gradio demo to make AnimateDiff easier to use. To launch the demo, please run the following commands:
conda activate animatediff
python app.py
By default, the demo will run at localhost:7860
.
Motion Modules
| Name | Parameter | Storage Space | |----------------------|-----------|---------------| | mm_sd_v14.ckpt | 417 M | 1.6 GB | | mm_sd_v15.ckpt | 417 M | 1.6 GB | | mm_sd_v15_v2.ckpt | 453 M | 1.7 GB |
MotionLoRAs
| Name | Parameter | Storage Space | |--------------------------------------|-----------|---------------| | v2_lora_ZoomIn.ckpt | 19 M | 74 MB | | v2_lora_ZoomOut.ckpt | 19 M | 74 MB | | v2_lora_PanLeft.ckpt | 19 M | 74 MB | | v2_lora_PanRight.ckpt | 19 M | 74 MB | | v2_lora_TiltUp.ckpt | 19 M | 74 MB | | v2_lora_TiltDown.ckpt | 19 M | 74 MB | | v2_lora_RollingClockwise.ckpt | 19 M | 74 MB | | v2_lora_RollingAnticlockwise.ckpt | 19 M | 74 MB |
Installation
Please ensure the installation of xformer that is applied to reduce the inference memory.
Various resolution or number of frames
Currently, we recommend users to generate animation with 16 frames and 512 resolution that are aligned with our training settings. Notably, various resolution/frames may affect the quality more or less.
How to use it without any coding
1) Get lora models: train lora model with A1111 based on a collection of your own favorite images (e.g., tutorials English, Japanese, Chinese) or download Lora models from Civitai.
2) Animate lora models: using gradio interface or A1111 (e.g., tutorials English, Japanese, Chinese)
3) Be creative togther with other techniques, such as, super resolution, frame interpolation, music generation, etc.
Animating a given image
We totally agree that animating a given image is an appealing feature, which we would try to support officially in future. For now, you may enjoy other efforts from the talesofai.
Contributions from community
Contributions are always welcome!! The dev
branch is for community contributions. As for the main branch, we would like to align it with the original technical report :)
Please refer to ANIMATEDIFF for the detailed setup.
We collect several generated results in GALLERY.
@article{guo2023animatediff,
title={AnimateDiff: Animate Your Personalized Text-to-Image Diffusion Models without Specific Tuning},
author={Guo, Yuwei and Yang, Ceyuan and Rao, Anyi and Wang, Yaohui and Qiao, Yu and Lin, Dahua and Dai, Bo},
journal={arXiv preprint arXiv:2307.04725},
year={2023}
}
This project is released for academic use. We disclaim responsibility for user-generated content. 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.
Yuwei Guo: guoyuwei@pjlab.org.cn
Ceyuan Yang: yangceyuan@pjlab.org.cn
Bo Dai: daibo@pjlab.org.cn
Codebase built upon Tune-a-Video.