Downloads · 30 days
0
ai-forever/KandinskyVideo_1_1
KandinskyVideo_1_1 is a machine learning model from ai-forever. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This repository is the official implementation of Kandinsky Video 1.1 model.
Downloads · 30 days
0
Access
Public
Updated May 27, 2024
Repo size
20.2 GB
Likes
9
Public
Click a slice to open those files.
.pt20.1 GB · 100%
From the Hugging Face model README
This repository is the official implementation of Kandinsky Video 1.1 model.
| Telegram-bot | Habr post | Our text-to-image model
Architecture details
from kandinsky_video import get_T2V_pipeline
device_map = 'cuda:0'
t2v_pipe = get_T2V_pipeline(device_map)
prompt = "A cat wearing sunglasses and working as a lifeguard at a pool."
fps = 'medium' # ['low', 'medium', 'high']
motion = 'high' # ['low', 'medium', 'high']
video = t2v_pipe(
prompt,
width=512, height=512,
fps=fps,
motion=motion,
key_frame_guidance_scale=5.0,
guidance_weight_prompt=5.0,
guidance_weight_image=3.0,
)
path_to_save = f'./_assets__/video.gif'
video[0].save(
path_to_save,
save_all=True, append_images=video[1:], duration=int(5500/len(video)), loop=0
)
<p align="center">
<img src="_assets__/video.gif" raw=true>
<br><em>Generated video</em>
</p>
from kandinsky_video import get_T2V_pipeline
device_map = 'cuda:0'
t2v_pipe = get_T2V_pipeline(device_map)
from PIL import Image
import requests
from io import BytesIO
url = 'https://media.cnn.com/api/v1/images/stellar/prod/gettyimages-1961294831.jpg'
response = requests.get(url)
img = Image.open(BytesIO(response.content))
img.show()
prompt = "A panda climbs up a tree."
fps = 'medium' # ['low', 'medium', 'high']
motion = 'medium' # ['low', 'medium', 'high']
video = t2v_pipe(
prompt,
image=img,
width=640, height=384,
fps=fps,
motion=motion,
key_frame_guidance_scale=5.0,
guidance_weight_prompt=5.0,
guidance_weight_image=3.0,
)
path_to_save = f'./_assets__/video2.gif'
video[0].save(
path_to_save,
save_all=True, append_images=video[1:], duration=int(5500/len(video)), loop=0
)
<p align="center">
<img src="https://media.cnn.com/api/v1/images/stellar/prod/gettyimages-1961294831.jpg" width="50%"><br>
<em>Input image.</em>
</p>
<p align="center">
<img src="_assets__/video2.gif"><br>
<em>Generated Video.</em>
</p>
If you use our work in your research, please cite our publication:
@article{arkhipkin2023fusionframes,
title = {FusionFrames: Efficient Architectural Aspects for Text-to-Video Generation Pipeline},
author = {Arkhipkin, Vladimir and Shaheen, Zein and Vasilev, Viacheslav and Dakhova, Elizaveta and Kuznetsov, Andrey and Dimitrov, Denis},
journal = {arXiv preprint arXiv:2311.13073},
year = {2023},
}