Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ControlNet Union controlnet_conditioning_scale for multiple control inputs #10666

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

hlky
Copy link
Collaborator

@hlky hlky commented Jan 27, 2025

What does this PR do?

e.g. 'controlnet_conditioning_scale': [0.5, 0.8]

Removes unneeded check that was copied from other controlnet as controlnet union supports multiple inputs with the same controlnet model.

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@vladmandic

@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 for the fix!

@yiyixuxu yiyixuxu merged commit 18f7d1d into huggingface:main Jan 27, 2025
12 checks passed
@vladmandic
Copy link
Contributor

ok, but this needs to be end-to-end for all args, now it fails with:

float(i / len(timesteps) < control_guidance_start or (i + 1) / len(timesteps) > control_guidance_end)
TypeError: '<' not supported between instances of 'float' and 'list'

@john09282922
Copy link

is it possible to use multiple controlnet for now?

@hlky
Copy link
Collaborator Author

hlky commented Jan 30, 2025

@john09282922 Yes. As per the title the issue is with multiple controlnet_conditioning_scale values.

@john09282922
Copy link

@john09282922 Yes. As per the title the issue is with multiple controlnet_conditioning_scale values.

Thanks for your work, Can you explain how to use multiple controlnet through union? Is scale parameter setting up same scale? like [0.5,0.5] or [0.6, 07]?

@john09282922
Copy link

is it possible to use separate scales on each controlnet?

@hlky @yiyixuxu @vladmandic

@hlky
Copy link
Collaborator Author

hlky commented Feb 3, 2025

@john09282922 After further testing we found this is a limitation of ControlNet Union - we are tracking the issue here #10656

There is some experimentation that could allow scale per control type otherwise we are planning on allowing multiple ControlNet Union models in the same manner that other ControlNet pipelines work however this would negate the benefit of ControlNet Union.

A single scale value is supported which should cover most use cases, the primary use case that is not supported would be multiple control_guidance_start and control_guidance_end as the underlying code uses controlnet_conditioning_scale to turn off the ControlNet, again a single value for control_guidance_start and control_guidance_end is currently supported.

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