Diffusers
Safetensors
Kandinsky5T2VPipeline
ai-forever leffff commited on
Commit
c5c2abc
Β·
verified Β·
1 Parent(s): 8a5a6b4

Update README.md (#1)

Browse files

- Update README.md (e2f3cd9c50e0adaea8ae2441b0202709a937cc7a)


Co-authored-by: Lev Novitskiy <[email protected]>

Files changed (1) hide show
  1. README.md +184 -3
README.md CHANGED
@@ -1,3 +1,184 @@
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
+ -----
15
+
16
+ <h1>Kandinsky 5.0 T2V Lite - Diffusers</h1>
17
+
18
+ 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.
19
+
20
+ ## Project Updates
21
+
22
+ - πŸ”₯ **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.
23
+ - πŸš€ **Diffusers Integration**: Now available with easy-to-use πŸ€— Diffusers pipeline!
24
+
25
+ ## Kandinsky 5.0 T2V Lite
26
+
27
+ 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.
28
+
29
+ We provide 8 model variants, each optimized for different use cases:
30
+
31
+ * **SFT model** β€” delivers the highest generation quality
32
+ * **CFG-distilled** β€” runs 2Γ— faster
33
+ * **Diffusion-distilled** β€” enables low-latency generation with minimal quality loss (6Γ— faster)
34
+ * **Pretrain model** β€” designed for fine-tuning by researchers and enthusiasts
35
+
36
+
37
+ ## Basic Usage
38
+ ```python
39
+ import torch
40
+ from diffusers import Kandinsky5T2VPipeline
41
+ from diffusers.utils import export_to_video
42
+
43
+ # Load the pipeline
44
+ pipe = Kandinsky5T2VPipeline.from_pretrained(
45
+ "ai-forever/Kandinsky-5.0-T2V-Lite-nocfg-5s-Diffusers",
46
+ torch_dtype=torch.bfloat16
47
+ )
48
+ pipe = pipe.to("cuda")
49
+
50
+ # Generate video
51
+ prompt = "A cat and a dog baking a cake together in a kitchen."
52
+ negative_prompt = "Static, 2D cartoon, cartoon, 2d animation, paintings, images, worst quality, low quality, ugly, deformed, walking backwards"
53
+
54
+ output = pipe(
55
+ prompt=prompt,
56
+ negative_prompt=negative_prompt,
57
+ height=512,
58
+ width=768,
59
+ num_frames=241,
60
+ num_inference_steps=50,
61
+ guidance_scale=1.0,
62
+ ).frames[0]
63
+
64
+ ## Save the video
65
+ export_to_video(output, "output.mp4", fps=24, quality=9)
66
+ ```
67
+
68
+ ## Using Different Model Variants
69
+ ```python
70
+ import torch
71
+ from diffusers import Kandinsky5T2VPipeline
72
+
73
+ # 5s SFT model (highest quality)
74
+ pipe_sft = Kandinsky5T2VPipeline.from_pretrained(
75
+ "ai-forever/Kandinsky-5.0-T2V-Lite-sft-5s-Diffusers",
76
+ torch_dtype=torch.bfloat16
77
+ )
78
+
79
+ # 5s Distilled 16-step model (fastest)
80
+ pipe_distill = Kandinsky5T2VPipeline.from_pretrained(
81
+ "ai-forever/Kandinsky-5.0-T2V-Lite-distilled16steps-5s-Diffusers",
82
+ torch_dtype=torch.bfloat16
83
+ )
84
+
85
+ # 5s No-CFG model (balanced speed/quality)
86
+ pipe_nocfg = Kandinsky5T2VPipeline.from_pretrained(
87
+ "ai-forever/Kandinsky-5.0-T2V-Lite-nocfg-5s-Diffusers",
88
+ torch_dtype=torch.bfloat16
89
+ )
90
+
91
+ # 5s Pretrain model (most diverse)
92
+ pipe_pretrain = Kandinsky5T2VPipeline.from_pretrained(
93
+ "ai-forever/Kandinsky-5.0-T2V-Lite-pretrain-5s-Diffusers",
94
+ torch_dtype=torch.bfloat16
95
+ )
96
+
97
+ # 10s SFT model (highest quality)
98
+ pipe_sft = Kandinsky5T2VPipeline.from_pretrained(
99
+ "ai-forever/Kandinsky-5.0-T2V-Lite-sft-10s-Diffusers",
100
+ torch_dtype=torch.bfloat16
101
+ )
102
+
103
+ # 10s Distilled 16-step model (fastest)
104
+ pipe_distill = Kandinsky5T2VPipeline.from_pretrained(
105
+ "ai-forever/Kandinsky-5.0-T2V-Lite-distilled16steps-10s-Diffusers",
106
+ torch_dtype=torch.bfloat16
107
+ )
108
+
109
+ # 10s No-CFG model (balanced speed/quality)
110
+ pipe_nocfg = Kandinsky5T2VPipeline.from_pretrained(
111
+ "ai-forever/Kandinsky-5.0-T2V-Lite-nocfg-10s-Diffusers",
112
+ torch_dtype=torch.bfloat16
113
+ )
114
+
115
+ # 10s Pretrain model (most diverse)
116
+ pipe_pretrain = Kandinsky5T2VPipeline.from_pretrained(
117
+ "ai-forever/Kandinsky-5.0-T2V-Lite-pretrain-10s-Diffusers",
118
+ torch_dtype=torch.bfloat16
119
+ )
120
+ ```
121
+
122
+ ## Architecture
123
+ Latent diffusion pipeline with Flow Matching.
124
+
125
+ Diffusion Transformer (DiT) as the main generative backbone with cross-attention to text embeddings.
126
+
127
+ Qwen2.5-VL and CLIP provides text embeddings
128
+
129
+ HunyuanVideo 3D VAE encodes/decodes video into a latent space
130
+
131
+ DiT is the main generative module using cross-attention to condition on text
132
+
133
+ <div align="center">
134
+ <img width="1600" height="477" alt="Pipeline Architecture" src="https://github.com/user-attachments/assets/17fc2eb5-05e3-4591-9ec6-0f6e1ca397b3" />
135
+ </div>
136
+
137
+ <div align="center">
138
+ <img width="800" height="406" alt="Model Architecture" src="https://github.com/user-attachments/assets/f3006742-e261-4c39-b7dc-e39330be9a09" />
139
+ </div>
140
+
141
+ ## Examples
142
+
143
+ Kandinsky 5.0 T2V Lite SFT
144
+ <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>
145
+ Kandinsky 5.0 T2V Lite Distill
146
+ <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>
147
+ Results
148
+ Side-by-Side Evaluation
149
+ The evaluation is based on the expanded prompts from the Movie Gen benchmark.
150
+
151
+ <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>
152
+ Distill Side-by-Side Evaluation
153
+ <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>
154
+ VBench Results
155
+ <div align="center"> <picture> <img src="assets/vbench.png"> </picture> </div>
156
+ Beta Testing
157
+ You can apply to participate in the beta testing of the Kandinsky Video Lite via the telegram bot.
158
+
159
+ ```bibtex
160
+ @misc{kandinsky2025,
161
+ author = {Alexey Letunovskiy, Maria Kovaleva, Ivan Kirillov, Lev Novitskiy, Denis Koposov,
162
+ Dmitrii Mikhailov, Anna Averchenkova, Andrey Shutkin, Julia Agafonova, Olga Kim,
163
+ Anastasiia Kargapoltseva, Nikita Kiselev, Vladimir Arkhipkin, Vladimir Korviakov,
164
+ Nikolai Gerasimenko, Denis Parkhomenko, Anna Dmitrienko, Anastasia Maltseva,
165
+ Kirill Chernyshev, Ilia Vasiliev, Viacheslav Vasilev, Vladimir Polovnikov,
166
+ Yury Kolabushin, Alexander Belykh, Mikhail Mamaev, Anastasia Aliaskina,
167
+ Tatiana Nikulina, Polina Gavrilova, Denis Dimitrov},
168
+ title = {Kandinsky 5.0: A family of diffusion models for Video & Image generation},
169
+ howpublished = {\url{https://github.com/ai-forever/Kandinsky-5}},
170
+ year = 2025
171
+ }
172
+
173
+ @misc{mikhailov2025nablanablaneighborhoodadaptiveblocklevel,
174
+ title={$\nabla$NABLA: Neighborhood Adaptive Block-Level Attention},
175
+ author={Dmitrii Mikhailov and Aleksey Letunovskiy and Maria Kovaleva and Vladimir Arkhipkin
176
+ and Vladimir Korviakov and Vladimir Polovnikov and Viacheslav Vasilev
177
+ and Evelina Sidorova and Denis Dimitrov},
178
+ year={2025},
179
+ eprint={2507.13546},
180
+ archivePrefix={arXiv},
181
+ primaryClass={cs.CV},
182
+ url={https://arxiv.org/abs/2507.13546},
183
+ }
184
+ ```