This repository is the official implementation of FancyVideo.
FancyVideo: Towards Dynamic and Consistent Video Generation via Cross-frame Textual Guidance Jiasong Feng, Ao Ma, Jing Wang, Bo Cheng, Xiaodan Liang, Dawei Lengβ , Yuhui Yin(Equal Contribution, βCorresponding Author)
Our code builds upon AnimateDiff, and we also incorporate insights from CV-VAE, Res-Adapter, and Long-CLIP to enhance our project. We appreciate the open-source contributions of these works.
Video demos can be found in the webpage. Some of them are contributed by the community. You can customize your own videos using the following reasoning code.
We tested our inference code on a machine with a 24GB 3090 GPU and CUDA environment version 12.1.
git clone https://github.com/360CVGroup/FancyVideo.git
cd FancyVideo
conda create -n fancyvideo python=3.10
conda activate fancyvideo
pip install -r requirements.txt
# fancyvideo-ckpts & cv-vae & res-adapter & longclip & sdv1.5-base-models
git lfs install
git clone https://huggingface.co/qihoo360/FancyVideo
mv FancyVideo/resources/models resources
# stable-diffusion-v1-5
git clone https://huggingface.co/runwayml/stable-diffusion-v1-5 resources/models
After download models, your resources folder is like:
π¦ resources/
βββ π models/
β βββ π fancyvideo_ckpts/
β βββ π vae_3d_61_frames/
β βββ π vae_3d_125_frames/
β βββ π video_extending/
β βββ π video_backtracking/
β βββ π CV-VAE/
β βββ π res-adapter/
β βββ π LongCLIP-L/
β βββ π sd_v1-5_base_models/
β βββ π stable-diffusion-v1-5/
βββ π demos/
β βββ π reference_images/
β βββ π reference_videos/
β βββ π test_prompts/
Due to the limited image generation capabilities of the SD1.5 model, we recommend generating the initial frame using a more advanced T2I model, such as SDXL, and then using our model's I2V capabilities to create the video.
CUDA_VISIBLE_DEVICES=0 PYTHONPATH=./ python scripts/demo.py --config configs/inference/i2v.yaml
Our model features universal T2V capabilities and can be customized with the SD1.5 community base model.
# use the base model of pixars
CUDA_VISIBLE_DEVICES=0 PYTHONPATH=./ python scripts/demo.py --config configs/inference/t2v_pixars.yaml
# use the base model of realcartoon3d
CUDA_VISIBLE_DEVICES=0 PYTHONPATH=./ python scripts/demo.py --config configs/inference/t2v_realcartoon3d.yaml
# use the base model of toonyou
CUDA_VISIBLE_DEVICES=0 PYTHONPATH=./ python scripts/demo.py --config configs/inference/t2v_toonyou.yaml
Similar to 3.1, section 3.2 can also utilize this model.
CUDA_VISIBLE_DEVICES=0 PYTHONPATH=./ python scripts/demo.py --config configs/inference/i2v_125_frames.yaml
You can expand your 61 frames of video to 125 frames by increasing the latent space from 16 to 32.
CUDA_VISIBLE_DEVICES=0 PYTHONPATH=./ python scripts/demo.py --config configs/inference/video_extending.yaml
You can downscale your 61 frames of video to 125 frames by adjusting the latent space from 16 to 32.
CUDA_VISIBLE_DEVICES=0 PYTHONPATH=./ python scripts/demo.py --config configs/inference/video_backtracking.yaml
We are seeking academic interns in the AIGC field. If interested, please send your resume to maao@360.cn.
@misc{feng2024fancyvideodynamicconsistentvideo,
title={FancyVideo: Towards Dynamic and Consistent Video Generation via Cross-frame Textual Guidance},
author={Jiasong Feng and Ao Ma and Jing Wang and Bo Cheng and Xiaodan Liang and Dawei Leng and Yuhui Yin},
year={2024},
eprint={2408.08189},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2408.08189},
}
This project is licensed under the Apache License (Version 2.0).