Diffusers
Safetensors
Kandinsky5T2VPipeline

Update README.md

#2
by leffff - opened
Files changed (1) hide show
  1. README.md +158 -3
README.md CHANGED
@@ -1,3 +1,158 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+ <div align="center">
5
+ <picture>
6
+ <img src="assets/KANDINSKY_LOGO_1_BLACK.png">
7
+ </picture>
8
+ </div>
9
+
10
+ <div align="center">
11
+ <a href="https://habr.com/ru/companies/sberbank/articles/951800/">Habr</a> | <a href="https://ai-forever.github.io/Kandinsky-5/">Project Page</a> | Technical Report (soon) | <a href="https://github.com/ai-forever/Kandinsky-5">Original Github</a> | <a href="https://huggingface.co/collections/ai-forever/kandinsky-50-t2v-lite-diffusers-68dd73ebac816748ed79d6cb"> πŸ€— Diffusers</a>
12
+ </div>
13
+
14
+ <h1>Kandinsky 5.0 T2V Lite - Diffusers</h1>
15
+
16
+ This repository provides the πŸ€— Diffusers integration for Kandinsky 5.0 T2V Lite - a lightweight video generation model (2B parameters) that ranks #1 among open-source models in its class.
17
+
18
+ ## Project Updates
19
+
20
+ - πŸ”₯ **2025/09/29**: We have open-sourced `Kandinsky 5.0 T2V Lite` a lite (2B parameters) version of `Kandinsky 5.0 Video` text-to-video generation model.
21
+ - πŸš€ **Diffusers Integration**: Now available with easy-to-use πŸ€— Diffusers pipeline!
22
+
23
+ ## Kandinsky 5.0 T2V Lite
24
+
25
+ Kandinsky 5.0 T2V Lite is a lightweight video generation model (2B parameters) that ranks #1 among open-source models in its class. It outperforms larger Wan models (5B and 14B) and offers the best understanding of Russian concepts in the open-source ecosystem.
26
+
27
+ We provide 8 model variants, each optimized for different use cases:
28
+
29
+ * **SFT model** β€” delivers the highest generation quality
30
+ * **CFG-distilled** β€” runs 2Γ— faster
31
+ * **Diffusion-distilled** β€” enables low-latency generation with minimal quality loss (6Γ— faster)
32
+ * **Pretrain model** β€” designed for fine-tuning by researchers and enthusiasts
33
+
34
+
35
+ ## Basic Usage
36
+ ```python
37
+ import torch
38
+ from diffusers import Kandinsky5T2VPipeline
39
+ from diffusers.utils import export_to_video
40
+
41
+ # Load the pipeline
42
+ pipe = Kandinsky5T2VPipeline.from_pretrained(
43
+ "ai-forever/Kandinsky-5.0-T2V-Lite-sft-5s",
44
+ torch_dtype=torch.float16
45
+ )
46
+ pipe = pipe.to("cuda")
47
+
48
+ # Generate video
49
+ prompt = "A cat and a dog baking a cake together in a kitchen."
50
+ negative_prompt = "Bright tones, overexposed, static, blurred details"
51
+
52
+ output = pipe(
53
+ prompt=prompt,
54
+ negative_prompt=negative_prompt,
55
+ height=512,
56
+ width=768,
57
+ num_frames=25,
58
+ num_inference_steps=50,
59
+ guidance_scale=5.0,
60
+ ).frames[0]
61
+
62
+ ## Save the video
63
+ export_to_video(output, "output.mp4", fps=24)
64
+ ```
65
+
66
+ ## Using Different Model Variants
67
+ ```python
68
+ import torch
69
+ from diffusers import Kandinsky5T2VPipeline
70
+
71
+ # SFT 5s model (highest quality)
72
+ pipe_sft = Kandinsky5T2VPipeline.from_pretrained(
73
+ "ai-forever/Kandinsky-5.0-T2V-Lite-sft-5s",
74
+ torch_dtype=torch.float16
75
+ )
76
+
77
+ # Distilled 16-step model (fastest)
78
+ pipe_distill = Kandinsky5T2VPipeline.from_pretrained(
79
+ "ai-forever/Kandinsky-5.0-T2V-Lite-distilled16steps-5s",
80
+ torch_dtype=torch.float16
81
+ )
82
+
83
+ # No-CFG model (balanced speed/quality)
84
+ pipe_nocfg = Kandinsky5T2VPipeline.from_pretrained(
85
+ "ai-forever/Kandinsky-5.0-T2V-Lite-nocfg-5s",
86
+ torch_dtype=torch.float16
87
+ )
88
+
89
+ # Pretrain model (most diverse)
90
+ pipe_pretrain = Kandinsky5T2VPipeline.from_pretrained(
91
+ "ai-forever/Kandinsky-5.0-T2V-Lite-pretrain-5s",
92
+ torch_dtype=torch.float16
93
+ )
94
+ ```
95
+
96
+ ## Architecture
97
+ Latent diffusion pipeline with Flow Matching.
98
+
99
+ Diffusion Transformer (DiT) as the main generative backbone with cross-attention to text embeddings.
100
+
101
+ Qwen2.5-VL and CLIP provides text embeddings
102
+
103
+ HunyuanVideo 3D VAE encodes/decodes video into a latent space
104
+
105
+ DiT is the main generative module using cross-attention to condition on text
106
+
107
+ <div align="center">
108
+ <img width="1600" height="477" alt="Pipeline Architecture" src="https://github.com/user-attachments/assets/17fc2eb5-05e3-4591-9ec6-0f6e1ca397b3" />
109
+ </div>
110
+
111
+ <div align="center">
112
+ <img width="800" height="406" alt="Model Architecture" src="https://github.com/user-attachments/assets/f3006742-e261-4c39-b7dc-e39330be9a09" />
113
+ </div>
114
+
115
+ ## Examples
116
+
117
+ Kandinsky 5.0 T2V Lite SFT
118
+ <table border="0" style="width: 200; text-align: left; margin-top: 20px;"> <tr> <td> <video src="https://github.com/user-attachments/assets/bc38821b-f9f1-46db-885f-1f70464669eb" width=200 controls autoplay loop></video> </td> <td> <video src="https://github.com/user-attachments/assets/9f64c940-4df8-4c51-bd81-a05de8e70fc3" width=200 controls autoplay loop></video> </td> <tr> <td> <video src="https://github.com/user-attachments/assets/77dd417f-e0bf-42bd-8d80-daffcd054add" width=200 controls autoplay loop></video> </td> <td> <video src="https://github.com/user-attachments/assets/385a0076-f01c-4663-aa46-6ce50352b9ed" width=200 controls autoplay loop></video> </td> <tr> <td> <video src="https://github.com/user-attachments/assets/7c1bcb31-cc7d-4385-9a33-2b0cc28393dd" width=200 controls autoplay loop></video> </td> <td> <video src="https://github.com/user-attachments/assets/990a8a0b-2df1-4bbc-b2e3-2859b6f1eea6" width=200 controls autoplay loop></video> </td> </tr> </table>
119
+ Kandinsky 5.0 T2V Lite Distill
120
+ <table border="0" style="width: 200; text-align: left; margin-top: 20px;"> <tr> <td> <video src="https://github.com/user-attachments/assets/861342f9-f576-4083-8a3b-94570a970d58" width=200 controls autoplay loop></video> </td> <td> <video src="https://github.com/user-attachments/assets/302e4e7d-781d-4a58-9b10-8c473d469c4b" width=200 controls autoplay loop></video> </td> <tr> <td> <video src="https://github.com/user-attachments/assets/3e70175c-40e5-4aec-b506-38006fe91a76" width=200 controls autoplay loop></video> </td> <td> <video src="https://github.com/user-attachments/assets/b7da85f7-8b62-4d46-9460-7f0e505de810" width=200 controls autoplay loop></video> </td> </table>
121
+ Results
122
+ Side-by-Side Evaluation
123
+ The evaluation is based on the expanded prompts from the Movie Gen benchmark.
124
+
125
+ <table border="0" style="width: 400; text-align: left; margin-top: 20px;"> <tr> <td> <img src="assets/sbs/kandinsky_5_video_lite_vs_sora.jpg" width=400 ></img> </td> <td> <img src="assets/sbs/kandinsky_5_video_lite_vs_wan_2.1_14B.jpg" width=400 ></img> </td> <tr> <td> <img src="assets/sbs/kandinsky_5_video_lite_vs_wan_2.2_5B.jpg" width=400 ></img> </td> <td> <img src="assets/sbs/kandinsky_5_video_lite_vs_wan_2.2_A14B.jpg" width=400 ></img> </td> <tr> <td> <img src="assets/sbs/kandinsky_5_video_lite_vs_wan_2.1_1.3B.jpg" width=400 ></img> </td> </table>
126
+ Distill Side-by-Side Evaluation
127
+ <table border="0" style="width: 400; text-align: left; margin-top: 20px;"> <tr> <td> <img src="assets/sbs/kandinsky_5_video_lite_5s_vs_kandinsky_5_video_lite_distill_5s.jpg" width=400 ></img> </td> <td> <img src="assets/sbs/kandinsky_5_video_lite_10s_vs_kandinsky_5_video_lite_distill_10s.jpg" width=400 ></img> </td> </table>
128
+ VBench Results
129
+ <div align="center"> <picture> <img src="assets/vbench.png"> </picture> </div>
130
+ Beta Testing
131
+ You can apply to participate in the beta testing of the Kandinsky Video Lite via the telegram bot.
132
+
133
+ ```bibtex
134
+ @misc{kandinsky2025,
135
+ author = {Alexey Letunovskiy, Maria Kovaleva, Ivan Kirillov, Lev Novitskiy, Denis Koposov,
136
+ Dmitrii Mikhailov, Anna Averchenkova, Andrey Shutkin, Julia Agafonova, Olga Kim,
137
+ Anastasiia Kargapoltseva, Nikita Kiselev, Vladimir Arkhipkin, Vladimir Korviakov,
138
+ Nikolai Gerasimenko, Denis Parkhomenko, Anna Dmitrienko, Anastasia Maltseva,
139
+ Kirill Chernyshev, Ilia Vasiliev, Viacheslav Vasilev, Vladimir Polovnikov,
140
+ Yury Kolabushin, Alexander Belykh, Mikhail Mamaev, Anastasia Aliaskina,
141
+ Tatiana Nikulina, Polina Gavrilova, Denis Dimitrov},
142
+ title = {Kandinsky 5.0: A family of diffusion models for Video & Image generation},
143
+ howpublished = {\url{https://github.com/ai-forever/Kandinsky-5}},
144
+ year = 2025
145
+ }
146
+
147
+ @misc{mikhailov2025nablanablaneighborhoodadaptiveblocklevel,
148
+ title={$\nabla$NABLA: Neighborhood Adaptive Block-Level Attention},
149
+ author={Dmitrii Mikhailov and Aleksey Letunovskiy and Maria Kovaleva and Vladimir Arkhipkin
150
+ and Vladimir Korviakov and Vladimir Polovnikov and Viacheslav Vasilev
151
+ and Evelina Sidorova and Denis Dimitrov},
152
+ year={2025},
153
+ eprint={2507.13546},
154
+ archivePrefix={arXiv},
155
+ primaryClass={cs.CV},
156
+ url={https://arxiv.org/abs/2507.13546},
157
+ }
158
+ ```