Home

Awesome

VideoCrafter2: Overcoming Data Limitations for High-Quality Video Diffusion Models

<a href='https://ailab-cvc.github.io/videocrafter2/'><img src='https://img.shields.io/badge/Project-Page-green'></a> <a href='https://arxiv.org/abs/2401.09047'><img src='https://img.shields.io/badge/Technique-Report-red'></a> Discord <a href='https://huggingface.co/spaces/VideoCrafter/VideoCrafter'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Model-blue'></a> GitHub

πŸ”₯πŸ”₯ Our dedicated high-resolution I2V model is released at: :point_right:DynamiCrafter!!!

πŸ”₯The VideoCrafter2 Large improvements over VideoCrafter1 with limited data. Better Motion, Better Concept Combination!!!

Please Join us and create your own film on Discord/Floor33.

πŸŽ₯ Exquisite film, produced by VideoCrafter2, directed by Human

IMAGE ALT TEXT HERE

πŸ”† Introduction

πŸ€—πŸ€—πŸ€— VideoCrafter is an open-source video generation and editing toolbox for crafting video content.
It currently includes the Text2Video and Image2Video models:

1. Generic Text-to-video Generation

Click the GIF to access the high-resolution video.

<table class="center"> <td><a href="https://github.com/AILab-CVC/VideoCrafter/assets/18735168/d20ee09d-fc32-44a8-9e9a-f12f44b30411"><img src=assets/t2v/tom.gif width="320"></td> <td><a href="https://github.com/AILab-CVC/VideoCrafter/assets/18735168/f1d9f434-28e8-44f6-a9b8-cffd67e4574d"><img src=assets/t2v/child.gif width="320"></td> <td><a href="https://github.com/AILab-CVC/VideoCrafter/assets/18735168/bbcfef0e-d8fb-4850-adc0-d8f937c2fa36"><img src=assets/t2v/woman.gif width="320"></td> <tr> <td style="text-align:center;" width="320">"Tom Cruise's face reflects focus, his eyes filled with purpose and drive."</td> <td style="text-align:center;" width="320">"A child excitedly swings on a rusty swing set, laughter filling the air."</td> <td style="text-align:center;" width="320">"A young woman with glasses is jogging in the park wearing a pink headband."</td> <tr> </table > <table class="center"> <td><a href="https://github.com/AILab-CVC/VideoCrafter/assets/18735168/7edafc5a-750e-45f3-a46e-b593751a4b12"><img src=assets/t2v/couple.gif width="320"></td> <td><a href="https://github.com/AILab-CVC/VideoCrafter/assets/18735168/37fe41c8-31fb-4e77-bcf9-fa159baa6d86"><img src=assets/t2v/rabbit.gif width="320"></td> <td><a href="https://github.com/AILab-CVC/VideoCrafter/assets/18735168/09791a46-a243-41b8-a6bb-892cdd3a83a2"><img src=assets/t2v/duck.gif width="320"></td> <tr> <td style="text-align:center;" width="320">"With the style of van gogh, A young couple dances under the moonlight by the lake."</td> <td style="text-align:center;" width="320">"A rabbit, low-poly game art style"</td> <td style="text-align:center;" width="320">"Impressionist style, a yellow rubber duck floating on the wave on the sunset"</td> <tr> </table >

2. Generic Image-to-video Generation

<table class="center"> <td><img src=assets/i2v/input/blackswan.png width="170"></td> <td><img src=assets/i2v/input/horse.png width="170"></td> <td><img src=assets/i2v/input/chair.png width="170"></td> <td><img src=assets/i2v/input/sunset.png width="170"></td> <tr> <td><a href="https://github.com/AILab-CVC/VideoCrafter/assets/18735168/1a57edd9-3fd2-4ce9-8313-89aca95b6ec7"><img src=assets/i2v/blackswan.gif width="170"></td> <td><a href="https://github.com/AILab-CVC/VideoCrafter/assets/18735168/d671419d-ae49-4889-807e-b841aef60e8a"><img src=assets/i2v/horse.gif width="170"></td> <td><a href="https://github.com/AILab-CVC/VideoCrafter/assets/18735168/39d730d9-7b47-4132-bdae-4d18f3e651ee"><img src=assets/i2v/chair.gif width="170"></td> <td><a href="https://github.com/AILab-CVC/VideoCrafter/assets/18735168/dc8dd0d5-a80d-4f31-94db-f9ea0b13172b"><img src=assets/i2v/sunset.gif width="170"></td> <tr> <td style="text-align:center;" width="170">"a black swan swims on the pond"</td> <td style="text-align:center;" width="170">"a girl is riding a horse fast on grassland"</td> <td style="text-align:center;" width="170">"a boy sits on a chair facing the sea"</td> <td style="text-align:center;" width="170">"two galleons moving in the wind at sunset"</td> </table >

:boom: You are highly recommended to try our dedicated I2V model DynamiCrafter: Higher resolution, Better Dynamics, More Coherence!!!


πŸ“ Changelog

⏳ Models

T2V-ModelsResolutionCheckpoints
VideoCrafter2320x512Hugging Face
VideoCrafter1576x1024Hugging Face
VideoCrafter1320x512Hugging Face
I2V-ModelsResolutionCheckpoints
VideoCrafter1640x1024Hugging Face
VideoCrafter1320x512Hugging Face

βš™οΈ Setup

1. Install Environment via Anaconda (Recommended)

conda create -n videocrafter python=3.8.5
conda activate videocrafter
pip install -r requirements.txt

πŸ’« Inference

1. Text-to-Video

  1. Download pretrained T2V models via Hugging Face, and put the model.ckpt in checkpoints/base_512_v2/model.ckpt.
  2. Input the following commands in terminal.
  sh scripts/run_text2video.sh

2. Image-to-Video

  1. Download pretrained I2V models via Hugging Face, and put the model.ckpt in checkpoints/i2v_512_v1/model.ckpt.
  2. Input the following commands in terminal.
  sh scripts/run_image2video.sh

3. Local Gradio demo

  1. Download the pretrained T2V and I2V models and put them in the corresponding directory according to the previous guidelines.
  2. Input the following commands in terminal.
  python gradio_app.py

πŸ“‹ Techinical Report

πŸ˜‰ VideoCrafter2 Tech report: VideoCrafter2: Overcoming Data Limitations for High-Quality Video Diffusion Models

πŸ˜‰ VideoCrafter1 Tech report: VideoCrafter1: Open Diffusion Models for High-Quality Video Generation <br>

πŸ˜‰ Citation

The technical report is currently unavailable as it is still in preparation. You can cite the paper of our image-to-video model and related base model.

@misc{chen2024videocrafter2,
      title={VideoCrafter2: Overcoming Data Limitations for High-Quality Video Diffusion Models}, 
      author={Haoxin Chen and Yong Zhang and Xiaodong Cun and Menghan Xia and Xintao Wang and Chao Weng and Ying Shan},
      year={2024},
      eprint={2401.09047},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

@misc{chen2023videocrafter1,
      title={VideoCrafter1: Open Diffusion Models for High-Quality Video Generation}, 
      author={Haoxin Chen and Menghan Xia and Yingqing He and Yong Zhang and Xiaodong Cun and Shaoshu Yang and Jinbo Xing and Yaofang Liu and Qifeng Chen and Xintao Wang and Chao Weng and Ying Shan},
      year={2023},
      eprint={2310.19512},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

@article{xing2023dynamicrafter,
      title={DynamiCrafter: Animating Open-domain Images with Video Diffusion Priors}, 
      author={Jinbo Xing and Menghan Xia and Yong Zhang and Haoxin Chen and Xintao Wang and Tien-Tsin Wong and Ying Shan},
      year={2023},
      eprint={2310.12190},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

@article{he2022lvdm,
      title={Latent Video Diffusion Models for High-Fidelity Long Video Generation}, 
      author={Yingqing He and Tianyu Yang and Yong Zhang and Ying Shan and Qifeng Chen},
      year={2022},
      eprint={2211.13221},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

πŸ€— Acknowledgements

Our codebase builds on Stable Diffusion. Thanks the authors for sharing their awesome codebases!

πŸ“’ Disclaimer

We develop this repository for RESEARCH purposes, so it can only be used for personal/research/non-commercial purposes.