Skip to content

Conversation

@leffff
Copy link
Contributor

@leffff leffff commented Oct 21, 2025

This PR adds support for 10 sec Kandinsky 5.0 model herd.

import torch
from diffusers import Kandinsky5T2VPipeline
from diffusers.utils import export_to_video

# Load the pipeline
pipe = Kandinsky5T2VPipeline.from_pretrained(
    "ai-forever/Kandinsky-5.0-T2V-Lite-sft-10s-Diffusers", 
    torch_dtype=torch.bfloat16
)
pipe = pipe.to("cuda")

# Generate video
prompt = [
    "Photorealistic closeup video of two intricately detailed pirate ships locked in a fierce battle, complete with cannon fire and billowing sails, as they sail through the swirling waters of a steaming cup of coffee. The ships are miniature but highly realistic, with wooden textures and flags fluttering in the liquid breeze. Coffee splashes and foam ripple around them as they maneuver through the turbulent surface, dodging each other's attacks. A detailed reflection of the battle appears on the glossy surface of the coffee, adding to the dynamic realism. The camera pans and zooms to capture every dramatic moment of the high-seas clash within this tiny, unexpected world.",
    "Bad quality",
]
negative_prompt = "Static, 2D cartoon, cartoon, 2d animation, paintings, images, worst quality, low quality, ugly, deformed, walking backwards"

pipe.transformer.set_attention_backend("flex")

output = pipe(
    prompt=prompt,
    negative_prompt=negative_prompt,
    height=512,
    width=768,
    num_frames=241,
    num_inference_steps=50,
    guidance_scale=5.0,
    num_videos_per_prompt=1,
    generator=torch.Generator(42)
)
output.12.mp4

leffff and others added 30 commits October 4, 2025 10:10
Co-authored-by: Álvaro Somoza <asomoza@users.noreply.github.com>
Co-authored-by: Álvaro Somoza <asomoza@users.noreply.github.com>
Co-authored-by: Álvaro Somoza <asomoza@users.noreply.github.com>
Co-authored-by: Álvaro Somoza <asomoza@users.noreply.github.com>
Co-authored-by: Álvaro Somoza <asomoza@users.noreply.github.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
@yiyixuxu
Copy link
Collaborator

@bot /style

@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

Style bot fixed some files and pushed the changes.

@leffff
Copy link
Contributor Author

leffff commented Oct 24, 2025

@yiyixuxu plz check the new docs version!

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks really good! thanks!

@sayakpaul
Copy link
Member

@leffff could you also add kandinsky_v5 to _toctree.yml?

@leffff
Copy link
Contributor Author

leffff commented Oct 24, 2025

Okay!

@leffff
Copy link
Contributor Author

leffff commented Oct 24, 2025

@sayakpaul @yiyixuxu done!

@leffff
Copy link
Contributor Author

leffff commented Oct 25, 2025

Please review and merge!

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! We should also add tests. Could you please do that too?

@stevhliu please also review the docs.

@leffff
Copy link
Contributor Author

leffff commented Oct 25, 2025

Okay!

@leffff
Copy link
Contributor Author

leffff commented Oct 27, 2025

Please check tests

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Just two minor comments.

@leffff
Copy link
Contributor Author

leffff commented Oct 27, 2025

Can we merge?

@yiyixuxu
Copy link
Collaborator

@bot /style

@github-actions
Copy link
Contributor

github-actions bot commented Oct 27, 2025

Style bot fixed some files and pushed the changes.

@leffff
Copy link
Contributor Author

leffff commented Oct 27, 2025

Lets merge. We really want the docs to appear on the website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants