Skip to content

Conversation

@leffff
Copy link
Contributor

@leffff leffff commented Nov 14, 2025

This PR:

  1. Updates Kandinsky 5.0 Video code for handling Pro Model.
  2. Adds Kandinsky 5.0 Image Lite (T2I and I2I)
    @yiyixuxu @sayakpaul

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>
@sayakpaul
Copy link
Member

pipeline = pipeline.to("cuda:0")

We actually don't need it if we're doing model CPU offloading. Additionally, we can do compile_repeated_blocks() instead of compile(). This will reduce the compilation time substantially!

Could you try that?

@leffff
Copy link
Contributor Author

leffff commented Nov 22, 2025

Right now there is some issue with compile_repeated_blocks()
I will look into that on Monday.

@leffff
Copy link
Contributor Author

leffff commented Nov 24, 2025

pipeline = pipeline.to("cuda:0")

We actually don't need it if we're doing model CPU offloading. Additionally, we can do compile_repeated_blocks() instead of compile(). This will reduce the compilation time substantially!

Could you try that?

I guess, we need it to specify the device. In case of a multi GPU machine. Can we leave it as is?

@sayakpaul
Copy link
Member

.to() won't be needed in any case. enable_model_cpu_offload() already defaults to the 0th ID and "cuda" as its device:

https://github.com/huggingface/diffusers/blob/544ba677dd97a49c8124208837025aa8b5ab639e/src/diffusers/pipelines/pipeline_utils.py#L1150C9-L1150C33

Otherwise, if we want to be more explicit, then we can add the following at the beginning of the script:

import os
os.environ["CUDA_VISIBLE_DEVICES"] = str(0)

@leffff
Copy link
Contributor Author

leffff commented Nov 24, 2025

Great, we have resolved the problems

@yiyixuxu
Copy link
Collaborator

@bot /style

@github-actions
Copy link
Contributor

Style fix is beginning .... View the workflow run here.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@yiyixuxu
Copy link
Collaborator

can you fix the kensindky tests? you can test locally with

pytest tests/pipelines/kandinsky5/test_kandinsky5.py

@leffff
Copy link
Contributor Author

leffff commented Nov 25, 2025

can you fix the kensindky tests? you can test locally with

pytest tests/pipelines/kandinsky5/test_kandinsky5.py

Sure

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.

8 participants