Skip to content

Conversation

asomoza
Copy link
Member

@asomoza asomoza commented Jul 8, 2025

What does this PR do?

This PR fixes the problems in the related issues, also it surprises me that no one have ever used this controlnet without cfg because it doesn't work, this PR also fixes that.

fixes #11861 #11828

Who can review?

@yiyixuxu

@@ -240,8 +247,8 @@ def __init__(
):
super().__init__()

if not isinstance(controlnet, ControlNetUnionModel):
raise ValueError("Expected `controlnet` to be of type `ControlNetUnionModel`.")
if isinstance(controlnet, (list, tuple)):
Copy link
Collaborator

Choose a reason for hiding this comment

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

ohh, so you would need to use multiple models too for controlnet union?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah this was added in this PR because of this comment

Basically is for people that want to control the start and the end for each condition, if you don't need that, you can use one controlnet union with multiple conditions.

Also is to make it the same as other controlnets so people don't have to code a special case for just this one in the UIs.

@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.

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.

thanks!

@asomoza asomoza merged commit 76a62ac into main Jul 10, 2025
15 checks passed
asomoza added a commit that referenced this pull request Jul 16, 2025
tolgacangoz pushed a commit to tolgacangoz/diffusers that referenced this pull request Jul 17, 2025
tolgacangoz pushed a commit to tolgacangoz/diffusers that referenced this pull request Jul 17, 2025
tolgacangoz pushed a commit to tolgacangoz/diffusers that referenced this pull request Jul 18, 2025
tolgacangoz pushed a commit to tolgacangoz/diffusers that referenced this pull request Jul 18, 2025
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.

ControlnetUnion not working correctly
3 participants