support sdxl
|
Before Width: | Height: | Size: 972 KiB |
|
Before Width: | Height: | Size: 591 KiB |
|
Before Width: | Height: | Size: 766 KiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 862 KiB |
|
Before Width: | Height: | Size: 639 KiB |
|
Before Width: | Height: | Size: 677 KiB |
|
Before Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 386 KiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 357 KiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 352 KiB After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 223 KiB |
|
Before Width: | Height: | Size: 339 KiB After Width: | Height: | Size: 710 KiB |
|
Before Width: | Height: | Size: 410 KiB After Width: | Height: | Size: 817 KiB |
|
Before Width: | Height: | Size: 429 KiB |
|
Before Width: | Height: | Size: 454 KiB |
|
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 485 KiB After Width: | Height: | Size: 2.2 MiB |
|
Before Width: | Height: | Size: 287 KiB After Width: | Height: | Size: 2.5 MiB |
|
Before Width: | Height: | Size: 293 KiB |
|
Before Width: | Height: | Size: 230 KiB |
|
Before Width: | Height: | Size: 239 KiB |
|
Before Width: | Height: | Size: 353 KiB |
|
Before Width: | Height: | Size: 386 KiB |
|
Before Width: | Height: | Size: 351 KiB |
|
Before Width: | Height: | Size: 379 KiB |
|
Before Width: | Height: | Size: 307 KiB |
|
Before Width: | Height: | Size: 258 KiB |
|
Before Width: | Height: | Size: 221 KiB |
|
Before Width: | Height: | Size: 213 KiB |
|
Before Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 396 KiB |
|
Before Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 2.2 MiB |
|
Before Width: | Height: | Size: 2.3 MiB |
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 741 KiB After Width: | Height: | Size: 741 KiB |
BIN
__assets__/animations/model_original/02.gif
Normal file
|
After Width: | Height: | Size: 1020 KiB |
|
Before Width: | Height: | Size: 591 KiB |
|
Before Width: | Height: | Size: 596 KiB |
|
Before Width: | Height: | Size: 601 KiB |
|
Before Width: | Height: | Size: 592 KiB |
|
Before Width: | Height: | Size: 553 KiB |
|
Before Width: | Height: | Size: 561 KiB |
|
Before Width: | Height: | Size: 552 KiB |
|
Before Width: | Height: | Size: 548 KiB |
|
Before Width: | Height: | Size: 543 KiB |
|
Before Width: | Height: | Size: 537 KiB |
|
Before Width: | Height: | Size: 559 KiB |
|
Before Width: | Height: | Size: 547 KiB |
|
Before Width: | Height: | Size: 556 KiB |
|
Before Width: | Height: | Size: 544 KiB |
|
Before Width: | Height: | Size: 544 KiB |
|
Before Width: | Height: | Size: 566 KiB |
|
Before Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 1.6 MiB |
@@ -1,112 +0,0 @@
|
||||
# AnimateDiff: training and inference setup
|
||||
## Setups for Inference
|
||||
|
||||
### Prepare Environment
|
||||
|
||||
***We updated our inference code with xformers and a sequential decoding trick. Now AnimateDiff takes only ~12GB VRAM to inference, and run on a single RTX3090 !!***
|
||||
|
||||
```
|
||||
git clone https://github.com/guoyww/AnimateDiff.git
|
||||
cd AnimateDiff
|
||||
|
||||
conda env create -f environment.yaml
|
||||
conda activate animatediff
|
||||
```
|
||||
|
||||
### Download Base T2I & Motion Module Checkpoints
|
||||
We provide two versions of our Motion Module, which are trained on stable-diffusion-v1-4 and finetuned on v1-5 seperately.
|
||||
It's recommanded to try both of them for best results.
|
||||
```
|
||||
git lfs install
|
||||
git clone https://huggingface.co/runwayml/stable-diffusion-v1-5 models/StableDiffusion/
|
||||
|
||||
bash download_bashscripts/0-MotionModule.sh
|
||||
```
|
||||
You may also directly download the motion module checkpoints from [Google Drive](https://drive.google.com/drive/folders/1EqLC65eR1-W-sGD0Im7fkED6c8GkiNFI?usp=sharing) / [HuggingFace](https://huggingface.co/guoyww/animatediff) / [CivitAI](https://civitai.com/models/108836/animatediff-motion-modules), then put them in `models/Motion_Module/` folder.
|
||||
|
||||
### Prepare Personalize T2I
|
||||
Here we provide inference configs for 6 demo T2I on CivitAI.
|
||||
You may run the following bash scripts to download these checkpoints.
|
||||
```
|
||||
bash download_bashscripts/1-ToonYou.sh
|
||||
bash download_bashscripts/2-Lyriel.sh
|
||||
bash download_bashscripts/3-RcnzCartoon.sh
|
||||
bash download_bashscripts/4-MajicMix.sh
|
||||
bash download_bashscripts/5-RealisticVision.sh
|
||||
bash download_bashscripts/6-Tusun.sh
|
||||
bash download_bashscripts/7-FilmVelvia.sh
|
||||
bash download_bashscripts/8-GhibliBackground.sh
|
||||
```
|
||||
|
||||
### Inference
|
||||
After downloading the above peronalized T2I checkpoints, run the following commands to generate animations. The results will automatically be saved to `samples/` folder.
|
||||
```
|
||||
python -m scripts.animate --config configs/prompts/1-ToonYou.yaml
|
||||
python -m scripts.animate --config configs/prompts/2-Lyriel.yaml
|
||||
python -m scripts.animate --config configs/prompts/3-RcnzCartoon.yaml
|
||||
python -m scripts.animate --config configs/prompts/4-MajicMix.yaml
|
||||
python -m scripts.animate --config configs/prompts/5-RealisticVision.yaml
|
||||
python -m scripts.animate --config configs/prompts/6-Tusun.yaml
|
||||
python -m scripts.animate --config configs/prompts/7-FilmVelvia.yaml
|
||||
python -m scripts.animate --config configs/prompts/8-GhibliBackground.yaml
|
||||
```
|
||||
|
||||
To generate animations with a new DreamBooth/LoRA model, you may create a new config `.yaml` file in the following format:
|
||||
```
|
||||
NewModel:
|
||||
inference_config: "[path to motion module config file]"
|
||||
|
||||
motion_module:
|
||||
- "models/Motion_Module/mm_sd_v14.ckpt"
|
||||
- "models/Motion_Module/mm_sd_v15.ckpt"
|
||||
|
||||
motion_module_lora_configs:
|
||||
- path: "[path to MotionLoRA model]"
|
||||
alpha: 1.0
|
||||
- ...
|
||||
|
||||
dreambooth_path: "[path to your DreamBooth model .safetensors file]"
|
||||
lora_model_path: "[path to your LoRA model .safetensors file, leave it empty string if not needed]"
|
||||
|
||||
steps: 25
|
||||
guidance_scale: 7.5
|
||||
|
||||
prompt:
|
||||
- "[positive prompt]"
|
||||
|
||||
n_prompt:
|
||||
- "[negative prompt]"
|
||||
```
|
||||
Then run the following commands:
|
||||
```
|
||||
python -m scripts.animate --config [path to the config file]
|
||||
```
|
||||
|
||||
|
||||
## Steps for Training
|
||||
|
||||
### Dataset
|
||||
Before training, download the videos files and the `.csv` annotations of [WebVid10M](https://maxbain.com/webvid-dataset/) to the local mechine.
|
||||
Note that our examplar training script requires all the videos to be saved in a single folder. You may change this by modifying `animatediff/data/dataset.py`.
|
||||
|
||||
### Configuration
|
||||
After dataset preparations, update the below data paths in the config `.yaml` files in `configs/training/` folder:
|
||||
```
|
||||
train_data:
|
||||
csv_path: [Replace with .csv Annotation File Path]
|
||||
video_folder: [Replace with Video Folder Path]
|
||||
sample_size: 256
|
||||
```
|
||||
Other training parameters (lr, epochs, validation settings, etc.) are also included in the config files.
|
||||
|
||||
### Training
|
||||
To train motion modules
|
||||
```
|
||||
torchrun --nnodes=1 --nproc_per_node=1 train.py --config configs/training/training.yaml
|
||||
```
|
||||
|
||||
To finetune the unet's image layers
|
||||
```
|
||||
torchrun --nnodes=1 --nproc_per_node=1 train.py --config configs/training/image_finetune.yaml
|
||||
```
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
# Gallery
|
||||
Here we demonstrate several best results we found in our experiments.
|
||||
|
||||
<table class="center">
|
||||
<tr>
|
||||
<td><img src="../animations/model_01/01.gif"></td>
|
||||
<td><img src="../animations/model_01/02.gif"></td>
|
||||
<td><img src="../animations/model_01/03.gif"></td>
|
||||
<td><img src="../animations/model_01/04.gif"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p style="margin-left: 2em; margin-top: -1em">Model:<a href="https://civitai.com/models/30240/toonyou">ToonYou</a></p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="../animations/model_02/01.gif"></td>
|
||||
<td><img src="../animations/model_02/02.gif"></td>
|
||||
<td><img src="../animations/model_02/03.gif"></td>
|
||||
<td><img src="../animations/model_02/04.gif"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p style="margin-left: 2em; margin-top: -1em">Model:<a href="https://civitai.com/models/4468/counterfeit-v30">Counterfeit V3.0</a></p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="../animations/model_03/01.gif"></td>
|
||||
<td><img src="../animations/model_03/02.gif"></td>
|
||||
<td><img src="../animations/model_03/03.gif"></td>
|
||||
<td><img src="../animations/model_03/04.gif"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p style="margin-left: 2em; margin-top: -1em">Model:<a href="https://civitai.com/models/4201/realistic-vision-v20">Realistic Vision V2.0</a></p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="../animations/model_04/01.gif"></td>
|
||||
<td><img src="../animations/model_04/02.gif"></td>
|
||||
<td><img src="../animations/model_04/03.gif"></td>
|
||||
<td><img src="../animations/model_04/04.gif"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p style="margin-left: 2em; margin-top: -1em">Model: <a href="https://civitai.com/models/43331/majicmix-realistic">majicMIX Realistic</a></p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="../animations/model_05/01.gif"></td>
|
||||
<td><img src="../animations/model_05/02.gif"></td>
|
||||
<td><img src="../animations/model_05/03.gif"></td>
|
||||
<td><img src="../animations/model_05/04.gif"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p style="margin-left: 2em; margin-top: -1em">Model:<a href="https://civitai.com/models/66347/rcnz-cartoon-3d">RCNZ Cartoon</a></p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="../animations/model_06/01.gif"></td>
|
||||
<td><img src="../animations/model_06/02.gif"></td>
|
||||
<td><img src="../animations/model_06/03.gif"></td>
|
||||
<td><img src="../animations/model_06/04.gif"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p style="margin-left: 2em; margin-top: -1em">Model:<a href="https://civitai.com/models/33208/filmgirl-film-grain-lora-and-loha">FilmVelvia</a></p>
|
||||
|
||||
#### Community Cases
|
||||
Here are some samples contributed by the community artists. Create a Pull Request if you would like to show your results here😚.
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="../animations/model_07/init.jpg"></td>
|
||||
<td><img src="../animations/model_07/01.gif"></td>
|
||||
<td><img src="../animations/model_07/02.gif"></td>
|
||||
<td><img src="../animations/model_07/03.gif"></td>
|
||||
<td><img src="../animations/model_07/04.gif"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p style="margin-left: 2em; margin-top: -1em">
|
||||
Character Model:<a href="https://civitai.com/models/13237/genshen-impact-yoimiya">Yoimiya</a>
|
||||
(with an initial reference image, see <a href="https://github.com/talesofai/AnimateDiff">WIP fork</a> for the extended implementation.)
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="../animations/model_08/01.gif"></td>
|
||||
<td><img src="../animations/model_08/02.gif"></td>
|
||||
<td><img src="../animations/model_08/03.gif"></td>
|
||||
<td><img src="../animations/model_08/04.gif"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p style="margin-left: 2em; margin-top: -1em">
|
||||
Character Model:<a href="https://civitai.com/models/9850/paimon-genshin-impact">Paimon</a>;
|
||||
Pose Model:<a href="https://civitai.com/models/107295/or-holdingsign">Hold Sign</a></p>
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 370 KiB |