Sponsored by
Crazyrouter
-The enterprise-grade, cost-effective AI API gateway that provides one API key to access 300+ AI models through OpenAI-compatible endpoints, with
We propose ConsistI2V, a diffusion-based method to enhance visual consistency for I2V generation. Specifically, we introduce (1) spatiotemporal attention over the first frame to maintain spatial and motion consistency, (2) noise initialization from the low-frequency band of the first frame to enhance layout consistency. These two approaches enable ConsistI2V to generate highly consistent videos.
Environment Setup
Prepare codebase and Conda environment using the following commands:
To generate videos with ConsistI2V, modify the inference configurations in
configs/inference/inference.yaml
and the input prompt file
configs/prompts/default.yaml
, and then run the sampling script with the following command:
The inference script automatically downloads the model from Hugging Face by specifying
pretrained_model_path
in
configs/inference/inference.yaml
as
TIGER-Lab/ConsistI2V
(default configuration). If you are having trouble downloading the model from the script, you can store the model on your local storage and modify
pretrained_model_path
to the local model path.
You can also explicitly define the input text prompt, negative prompt, sampling seed and first frame path as:
python -m scripts.animate \
--inference_config configs/inference/inference.yaml \
--prompt "timelapse at the snow land with aurora in the sky." \
--n_prompt "your negative prompt" \
--seed 42 \
--path_to_first_frame assets/example/example_01.png \
--format mp4
To modify inference configurations in
configs/inference/inference.yaml
from command line, append extra arguments to the end of the inference command:
python -m scripts.animate \
--inference_config configs/inference/inference.yaml \
... # additional arguments
--format mp4
sampling_kwargs.num_videos_per_prompt=4 \ # overwrite the configs in the config file
frameinit_kwargs.filter_params.d_s=0.5
Training
Modify the training configurations in
configs/training/training.yaml
and run the following command to train the model:
The dataloader in our code assumes a root folder
train_data.webvid_config.video_folder
containing all videos and a
jsonl
file
train_data.webvid_config.json_path
containing video relative paths and captions, with each line in the following format:
{"text": "A man rolling a winter sled with a child sitting on it in the snow close-up", "time": "30.030", "file": "relative/path/to/video.mp4", "fps": 29.97002997002997}
Videos can be stored in multiple subdirectories. Alternatively, you can modify the dataloader to support your own dataset. Similar to model inference, you can also add additional arguments at the end of the training command to modify the training configurations in
configs/training/training.yaml
.
Citation
Please kindly cite our paper if you find our code, data, models or results to be helpful.
@article{ren2024consisti2v,
title={ConsistI2V: Enhancing Visual Consistency for Image-to-Video Generation},
author={Ren, Weiming and Yang, Harry and Zhang, Ge and Wei, Cong and Du, Xinrun and Huang, Stephen and Chen, Wenhu},
journal={arXiv preprint arXiv:2402.04324},
year={2024}
}
Runs of TIGER-Lab ConsistI2V on huggingface.co
10
Total runs
0
24-hour runs
0
3-day runs
-2
7-day runs
4
30-day runs
More Information About ConsistI2V huggingface.co Model
ConsistI2V huggingface.co is an AI model on huggingface.co that provides ConsistI2V's model effect (), which can be used instantly with this TIGER-Lab ConsistI2V model. huggingface.co supports a free trial of the ConsistI2V model, and also provides paid use of the ConsistI2V. Support call ConsistI2V model through api, including Node.js, Python, http.
ConsistI2V huggingface.co is an online trial and call api platform, which integrates ConsistI2V's modeling effects, including api services, and provides a free online trial of ConsistI2V, you can try ConsistI2V online for free by clicking the link below.
TIGER-Lab ConsistI2V online free url in huggingface.co:
ConsistI2V is an open source model from GitHub that offers a free installation service, and any user can find ConsistI2V on GitHub to install. At the same time, huggingface.co provides the effect of ConsistI2V install, users can directly use ConsistI2V installed effect in huggingface.co for debugging and trial. It also supports api for free installation.