Views
No views yet

conda create -n vgen python=3.8
conda activate vgen
pip install torch==1.12.0+cu113 torchvision==0.13.0+cu113 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu113
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simpledata.git clone https://github.com/damo-vilab/i2vgen-xl.git
cd i2vgen-xlpython train_net.py --cfg configs/t2v_train.yamlt2v_train.yaml configuration file, you can specify the data, adjust the video-to-image ratio using frame_lens, and validate your ideas with different Diffusion settings, and so on.grad_scale settings, all of which are included in the Pretrain item in yaml file.workspace/experiments/t2v_traindirectory.python inference.py --cfg configs/t2v_infer.yamlworkspace/experiments/test_img_01 directory. For specific configurations such as data, models, seed, etc., please refer to the t2v_infer.yaml file.!pip install modelscope
from modelscope.hub.snapshot_download import snapshot_download
model_dir = snapshot_download('damo/I2VGen-XL', cache_dir='models/', revision='v1.0.0')python inference.py --cfg configs/i2vgen_xl_infer.yamlworkspace/experiments/test_img_01 directory. At present, we find that the current model performs inadequately on anime images and images with a black background due to the lack of relevant training data. We are consistently working to optimize it.ENGINE, MODEL, DATASETS, EMBEDDER, AUTO_ENCODER, DISTRIBUTION, VISUAL, DIFFUSION, PRETRAIN, and can be compatible with all our open-source algorithms according to your own needs. If you have any questions, feel free to give us your feedback at any time.1import torch
2from diffusers import I2VGenXLPipeline
3from diffusers.utils import load_image, export_to_gif
4
5repo_id = "ali-vilab/i2vgen-xl"
6pipeline = I2VGenXLPipeline.from_pretrained(repo_id, torch_dtype=torch.float16, variant="fp16").to("cuda")
7
8image_url = "https://github.com/ali-vilab/i2vgen-xl/blob/main/data/test_images/img_0009.png?download=true"
9image = load_image(image_url).convert("RGB")
10prompt = "Papers were floating in the air on a table in the library"
11
12generator = torch.manual_seed(8888)
13frames = pipeline(
14 prompt=prompt,
15 image=image,
16 generator=generator
17).frames[0]
18
19print(export_to_gif(frames))1@article{2023i2vgenxl,
2 title={I2VGen-XL: High-Quality Image-to-Video Synthesis via Cascaded Diffusion Models},
3 author={Zhang, Shiwei and Wang, Jiayu and Zhang, Yingya and Zhao, Kang and Yuan, Hangjie and Qing, Zhiwu and Wang, Xiang and Zhao, Deli and Zhou, Jingren},
4 booktitle={arXiv preprint arXiv:2311.04145},
5 year={2023}
6}
7@article{2023videocomposer,
8 title={VideoComposer: Compositional Video Synthesis with Motion Controllability},
9 author={Wang, Xiang and Yuan, Hangjie and Zhang, Shiwei and Chen, Dayou and Wang, Jiuniu, and Zhang, Yingya, and Shen, Yujun, and Zhao, Deli and Zhou, Jingren},
10 booktitle={arXiv preprint arXiv:2306.02018},
11 year={2023}
12}
13@article{wang2023modelscope,
14 title={Modelscope text-to-video technical report},
15 author={Wang, Jiuniu and Yuan, Hangjie and Chen, Dayou and Zhang, Yingya and Wang, Xiang and Zhang, Shiwei},
16 journal={arXiv preprint arXiv:2308.06571},
17 year={2023}
18}
19@article{dreamvideo,
20 title={DreamVideo: Composing Your Dream Videos with Customized Subject and Motion},
21 author={Wei, Yujie and Zhang, Shiwei and Qing, Zhiwu and Yuan, Hangjie and Liu, Zhiheng and Liu, Yu and Zhang, Yingya and Zhou, Jingren and Shan, Hongming},
22 journal={arXiv preprint arXiv:2312.04433},
23 year={2023}
24}
25@article{qing2023higen,
26 title={Hierarchical Spatio-temporal Decoupling for Text-to-Video Generation},
27 author={Qing, Zhiwu and Zhang, Shiwei and Wang, Jiayu and Wang, Xiang and Wei, Yujie and Zhang, Yingya and Gao, Changxin and Sang, Nong },
28 journal={arXiv preprint arXiv:2312.04483},
29 year={2023}
30}
31@article{wang2023videolcm,
32 title={VideoLCM: Video Latent Consistency Model},
33 author={Wang, Xiang and Zhang, Shiwei and Zhang, Han and Liu, Yu and Zhang, Yingya and Gao, Changxin and Sang, Nong },
34 journal={arXiv preprint arXiv:2312.09109},
35 year={2023}
36}