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+Adapter pipeline, and ControlNet+Adapter+Inpaint pipeline #5869

Merged

Conversation

affromero
Copy link
Contributor

What does this PR do?

Fixes #5847

Adds two custom pipelines: pipeline_stable_diffusion_xl_controlnet_adapter (StableDiffusionXLControlNetAdapterPipeline) and pipeline_stable_diffusion_xl_controlnet_adapter_inpaint (StableDiffusionXLControlNetAdapterInpaintPipeline).

They unify ControlNet and T2IAdapter into a single pipeline, where both methods can be exploited together in a single forward. control_image and adapter_image must be added to the forward call, and also controlnet_conditioning_scale and adapter_conditioning_scale to account for the strength.

I included some visuals in #5847.

The inpainting version follows the changes made in this PR #5527 (review)

I was not sure where to place the pipelines since there are independent subfolders for controlnet and adapter, so I naively put it in the stable_diffusion_xl folder.

Before submitting

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.

Pipelines: @patrickvonplaten and @sayakpaul

@affromero affromero force-pushed the controlnet_and_t2iadapter_pipeline branch 2 times, most recently from 023d436 to 42efd70 Compare November 20, 2023 15:14
@yiyixuxu
Copy link
Collaborator

yiyixuxu commented Nov 20, 2023

cc @patrickvonplaten

I think this should go into community folder for now

if there is a lot of usage and we decide to integrate to core I think we can deprecate the controlnet pipelines and adapter pipelines because this should be able to replace them no?

Let me know what you think

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Nov 21, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

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

Good to merge IMO - wdyt @yiyixuxu ?

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.

thank you!

@yiyixuxu yiyixuxu merged commit 93f1a14 into huggingface:main Nov 21, 2023
14 checks passed
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
…uggingface#5869)

* ControlNet+Adapter pipeline, and +Inpaint pipeline


---------

Co-authored-by: andres <andres@hax.ai>
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.

ControlNet + T2IAdapter Pipeline
4 participants