Accept pooled_prompt_embeds in the SDXL Controlnet pipeline. Fixes an error if prompt_embeds are passed. by cmdr2 · Pull Request #4309 · huggingface/diffusers · GitHub
Skip to content

Accept pooled_prompt_embeds in the SDXL Controlnet pipeline. Fixes an error if prompt_embeds are passed. - #4309

Merged
sayakpaul merged 3 commits into
huggingface:mainfrom
cmdr2:cn_sdxl
Aug 3, 2023
Merged

sayakpaul merged 3 commits into
huggingface:mainfrom
cmdr2:cn_sdxl

Conversation

@cmdr2

@cmdr2 cmdr2 commented Jul 27, 2023

Copy link
Copy Markdown
Contributor

Hi,

The SDXL Controlnet pipeline would fail to run if prompt_embeds was passed (instead of prompt), because the implementation wouldn't create the pooled embeds (and would fail later with a NoneType does not have repeat method error).

This copies the code from the other SDXL pipelines.

Thanks!

@sayakpaul @patrickvonplaten

@HuggingFaceDocBuilderDev

HuggingFaceDocBuilderDev commented Jul 27, 2023 •

Copy link
Copy Markdown

@patrickvonplaten

Copy link
Copy Markdown
Contributor

Cool!

@sayakpaul sayakpaul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Excellent. Do you think it might be worth to also add a test for this?

@cmdr2

cmdr2 commented Aug 3, 2023

Copy link
Copy Markdown
Contributor Author

@sayakpaul Thanks. I've added a test, by copying the test from test_stable_diffusion_xl.py.

@sayakpaul

Copy link
Copy Markdown
Member

Thanks for your amazing contribution.

@sayakpaul sayakpaul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Amazing!

@sayakpaul
sayakpaul merged commit 4c4fe04 into huggingface:main Aug 3, 2023
@cmdr2

cmdr2 commented Aug 3, 2023

Copy link
Copy Markdown
Contributor Author

yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
… error if prompt_embeds are passed. (huggingface#4309)

* Accept pooled_prompt_embeds in the SDXL Controlnet pipeline. Fixes an error if prompt_embeds are passed.

* Add a test for pooled prompt embeds
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
… error if prompt_embeds are passed. (huggingface#4309)

* Accept pooled_prompt_embeds in the SDXL Controlnet pipeline. Fixes an error if prompt_embeds are passed.

* Add a test for pooled prompt embeds
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