Jinbo Xing, Menghan Xia*, Yong Zhang, Haoxin Chen, Wangbo Yu,
Hanyuan Liu, Xintao Wang, Tien-Tsin Wong*, Ying Shan
From CUHK and Tencent AI Lab.
at European Conference on Computer Vision (ECCV) 2024, Oral
🔥🔥 Training / Fine-tuning code is available NOW!!!
🔥 We 1024x576 version ranks 1st on the I2V benchmark list from VBench!
🔥 Generative frame interpolation / looping video generation model weights (320x512) have been released!
🔥 New Update Rolls Out for DynamiCrafter! Better Dynamic, Higher Resolution, and Stronger Coherence!
🤗 DynamiCrafter can animate open-domain still images based on text prompt by leveraging the pre-trained video diffusion priors. Please check our project page and paper for more information.
👀 Seeking comparisons with Stable Video Diffusion and PikaLabs? Click the image below.
"bear playing guitar happily, snowing" | "boy walking on the street" | ||
Input starting frame | Input ending frame | Generated video |
- [2024.06.14]: 🔥🔥 Release training code for interpolation.
- [2024.05.24]: Release WebVid10M-motion annotations.
- [2024.05.05]: Release training code.
- [2024.03.14]: Release generative frame interpolation and looping video models (320x512).
- [2024.02.05]: Release high-resolution models (320x512 & 576x1024).
- [2023.12.02]: Launch the local Gradio demo.
- [2023.11.29]: Release the main model at a resolution of 256x256.
- [2023.11.27]: Launch the project page and update the arXiv preprint.
Model | Resolution | GPU Mem. & Inference Time (A100, ddim 50steps) | Checkpoint |
---|---|---|---|
DynamiCrafter1024 | 576x1024 | 18.3GB & 75s (perframe_ae=True ) |
Hugging Face |
DynamiCrafter512 | 320x512 | 12.8GB & 20s (perframe_ae=True ) |
Hugging Face |
DynamiCrafter256 | 256x256 | 11.9GB & 10s (perframe_ae=False ) |
Hugging Face |
DynamiCrafter512_interp | 320x512 | 12.8GB & 20s (perframe_ae=True ) |
Hugging Face |
Currently, our DynamiCrafter can support generating videos of up to 16 frames with a resolution of 576x1024. The inference time can be reduced by using fewer DDIM steps.
GPU memory consumed on RTX 4090 reported by @noguchis in Twitter: 18.3GB (576x1024), 12.8GB (320x512), 11.9GB (256x256).
conda create -n dynamicrafter python=3.8.5
conda activate dynamicrafter
pip install -r requirements.txt
- Download pretrained models via Hugging Face, and put the
model.ckpt
with the required resolution incheckpoints/dynamicrafter_[1024|512|256]_v1/model.ckpt
. - Run the commands based on your devices and needs in terminal.
# Run on a single GPU:
# Select the model based on required resolutions: i.e., 1024|512|320:
sh scripts/run.sh 1024
# Run on multiple GPUs for parallel inference:
sh scripts/run_mp.sh 1024
Download pretrained model DynamiCrafter512_interp and put the model.ckpt
in checkpoints/dynamicrafter_512_interp_v1/model.ckpt
.
sh scripts/run_application.sh interp # Generate frame interpolation
sh scripts/run_application.sh loop # Looping video generation
- Download the pretrained models and put them in the corresponding directory according to the previous guidelines.
- Input the following commands in terminal (choose a model based on the required resolution: 1024, 512 or 256).
python gradio_app.py --res 1024
Download the pretrained model and put it in the corresponding directory according to the previous guidelines.
python gradio_app_interp_and_loop.py
- Download the WebVid Dataset, and important items in
.csv
arepage_dir
,videoid
, andname
. - Download the pretrained models and put them in the corresponding directory according to the previous guidelines.
- Change
<YOUR_SAVE_ROOT_DIR>
path intraining_[1024|512]_v1.0/run.sh
- Carefully check all paths in
training_[1024|512]_v1.0/config.yaml
, includingmodel:pretrained_checkpoint
,data:data_dir
, anddata:meta_path
. - Input the following commands in terminal (choose a model based on the required resolution: 1024 or 512).
We adopt DDPShardedStrategy
by default for training, please make sure it is available in your pytorch_lightning.
sh configs/training_1024_v1.0/run.sh ## fine-tune DynamiCrafter1024
- All the checkpoints/tensorboard record/loginfo will be saved in
<YOUR_SAVE_ROOT_DIR>
.
Download pretrained model DynamiCrafter512_interp and put the model.ckpt
in checkpoints/dynamicrafter_512_interp_v1/model.ckpt
. Follow the same fine-tuning procedure in "Image-to-Video Generation", and run the script below:
sh configs/training_512_v1.0/run_interp.sh
The annoations of our WebVid-10M-motion is available on Huggingface Dataset. In addition to the original annotations, we add three more motion-related annotations: dynamic_confidence
, dynamic_wording
, and dynamic_source_category
. Please refer to our supplementary document (Section D) for more details.
- ComfyUI and pruned models (bf16): ComfyUI-DynamiCrafterWrapper (Thanks to kijai)
Model | Resolution | GPU Mem. | Checkpoint |
---|---|---|---|
DynamiCrafter1024 | 576x1024 | 10GB | Hugging Face |
DynamiCrafter512_interp | 320x512 | 8GB | Hugging Face |
-
ComfyUI: ComfyUI-DynamiCrafter (Thanks to chaojie)
-
ComfyUI: ComfyUI_Native_DynamiCrafter (Thanks to ExponentialML)
-
Docker: DynamiCrafter_docker (Thanks to maximofn)
VideoCrafter1: Framework for high-quality video generation.
ScaleCrafter: Tuning-free method for high-resolution image/video generation.
TaleCrafter: An interactive story visualization tool that supports multiple characters.
LongerCrafter: Tuning-free method for longer high-quality video generation.
MakeYourVideo, might be a Crafter:): Video generation/editing with textual and structural guidance.
StyleCrafter: Stylized-image-guided text-to-image and text-to-video generation.
Please consider citing our paper if our code and dataset annotations are useful:
@article{xing2023dynamicrafter,
title={DynamiCrafter: Animating Open-domain Images with Video Diffusion Priors},
author={Xing, Jinbo and Xia, Menghan and Zhang, Yong and Chen, Haoxin and Yu, Wangbo and Liu, Hanyuan and Wang, Xintao and Wong, Tien-Tsin and Shan, Ying},
journal={arXiv preprint arXiv:2310.12190},
year={2023}
}
We would like to thank AK(@_akhaliq) for the help of setting up hugging face online demo, and camenduru for providing the replicate & colab online demo, and Xinliang for his support and contribution to the open source project.
This project strives to impact the domain of AI-driven video generation positively. Users are granted the freedom to create videos using this tool, but they are expected to comply with local laws and utilize it responsibly. The developers do not assume any responsibility for potential misuse by users.