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

Add sdxl controlnet reference community pipeline #9893

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

dimitribarbot
Copy link

What does this PR do?

It provides reference controlnet support for sdxl model used along other controlnet models. It is based on Stable Diffusion ControlNet Reference and Stable Diffusion XL Reference community pipelines, and inherits the Stable Diffusion XL ControlNet Pipeline.

Fixes #4675

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.

@dimitribarbot dimitribarbot changed the title Add sdxl controlnet reference Add sdxl controlnet reference pipeline Nov 8, 2024
@dimitribarbot dimitribarbot changed the title Add sdxl controlnet reference pipeline Add sdxl controlnet reference community pipeline Nov 8, 2024
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, I left some minor comments. LMK if they make sense.

![Output_image](https://github.com/zideliu/diffusers/assets/34944964/743848da-a215-48f9-ae39-b5e2ae49fb13)
![Output_image](https://github.com/user-attachments/assets/4fd5bc0b-8df6-4581-9191-c07faaf10ce8)
Copy link
Member

Choose a reason for hiding this comment

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

Why are we changing this?

Copy link
Author

Choose a reason for hiding this comment

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

It seems to me that the url at https://github.com/zideliu/diffusers/assets/34944964/743848da-a215-48f9-ae39-b5e2ae49fb13 cannot be found (404). The diffusers repository fork seems to have been removed by their author. Do you confirm?

Actually, I've updated the stable_diffusion_xl_reference.py file with the latest modifications from StableDiffusionXLPipeline on my side. If you agree, I propose to create a new PR:

  • Upgrading the StableDiffusionXLReferencePipeline to use the latest modifications from StableDiffusionXLPipeline (IP adapters...),
  • Replacing the human example of this updated StableDiffusionXLReferencePipeline by a non-human one and fixing the 404 url at the same time.

Copy link
Author

Choose a reason for hiding this comment

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

Other PR is #9938.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe you could open a PR to https://hf.co/datasets/huggingface/documentation-images and host the images there?

Copy link
Author

Choose a reason for hiding this comment

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

Comment on lines 2750 to 2764
Output Image

`prompt: 1 girl`

`reference_attn=True, reference_adain=True, num_inference_steps=20, style_fidelity=1.0`

![Output_image](https://github.com/user-attachments/assets/b320f081-2421-4b96-9ef1-4685b77179ba)

`reference_attn=False, reference_adain=True, num_inference_steps=20, style_fidelity=1.0`

![Output_image](https://github.com/user-attachments/assets/05ee0816-6c4e-4f4b-81fc-71bb0082be1e)

`reference_attn=True, reference_adain=False, num_inference_steps=20, style_fidelity=1.0`

![Output_image](https://github.com/user-attachments/assets/cfb7426b-9e1b-4401-8e7e-609d67b84f8b)
Copy link
Member

Choose a reason for hiding this comment

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

Can we avoid using human references in the examples and restrict ourselves to using non-human objects?

Copy link
Author

Choose a reason for hiding this comment

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

Sure. I've pushed modifications to fix that.

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 Reference Only for SD XL
2 participants