Jinbo Xing, Hanyuan Liu, Menghan Xia, Yong Zhang, Xintao Wang, Ying Shan, Tien-Tsin Wong
From CUHK and Tencent AI Lab.
at SIGGRAPH Asia 2024, Journal Track
π€ ToonCrafter can interpolate two cartoon images by leveraging the pre-trained image-to-video diffusion priors. Please check our project page and paper for more information.
Input starting frame | Input ending frame | Generated video |
Input starting frame | Input ending frame | Input sketch guidance | Generated video |
Input starting frame | Input ending frame | Generated video |
Input sketch | Input reference | Colorization results |
- Add sketch control and colorization function.
- [2024.05.29]: π₯π₯ Release code and model weights.
- [2024.05.28]: Launch the project page and update the arXiv preprint.
Model | Resolution | GPU Mem. & Inference Time (A100, ddim 50steps) | Checkpoint |
---|---|---|---|
ToonCrafter_512 | 320x512 | ~24G & 24s (perframe_ae=True ) |
Hugging Face |
We get the feedback from issues that the model may consume about 24G~27G GPU memory in this implementation, but the community has lowered the consumption to ~10GB.
Currently, our ToonCrafter can support generating videos of up to 16 frames with a resolution of 512x320. The inference time can be reduced by using fewer DDIM steps.
conda create -n tooncrafter python=3.8.5
conda activate tooncrafter
pip install -r requirements.txt
Download pretrained ToonCrafter_512 and put the model.ckpt
in checkpoints/tooncrafter_512_interp_v1/model.ckpt
.
sh scripts/run.sh
Download the pretrained model and put it in the corresponding directory according to the previous guidelines.
python gradio_app.py
- ComfyUI and pruned models (fp16): ComfyUI-DynamiCrafterWrapper (Thanks to kijai)
Model | Resolution | GPU Mem. | Checkpoint |
---|---|---|---|
ToonCrafter | 512x320 | 12GB | Hugging Face |
-
ComfyUI. ComfyUI-ToonCrafter (Thanks to Yorha4D)
-
Windows platform support: ToonCrafter-for-windows (Thanks to sdbds)
-
Sketch-guidance implementation: ToonCrafter_with_SketchGuidance (Thanks to mattyamonaca)
Please consider citing our paper if our code is useful:
@article{xing2024tooncrafter,
title={ToonCrafter: Generative Cartoon Interpolation},
author={Xing, Jinbo and Liu, Hanyuan and Xia, Menghan and Zhang, Yong and Wang, Xintao and Shan, Ying and Wong, Tien-Tsin},
journal={arXiv preprint arXiv:2405.17933},
year={2024}
}
We would like to thank Xiaoyu for providing the sketch extractor, and supraxylon for the Windows batch script.
We have not set up any official profit-making projects or web applications. Please be cautious.
Calm down. Our framework opens up the era of generative cartoon interpolation, but due to the variaity of generative video prior, the success rate is not guaranteed.
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.