Skip to content

fix sdxl_lwp empty neg_prompt error issue #4743

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

Merged
merged 3 commits into from
Aug 25, 2023

Conversation

xhinker
Copy link
Contributor

@xhinker xhinker commented Aug 23, 2023

What does this PR do?

Fix lpw_stable_diffusion_xl empty negative prompt error issue

Fixes # (issue)

Before submitting

Who can review?

@sayakpaul I submitted a PR to fix the empty negative prompt throw error issue for lpw_stable_diffusion_xl.py. please help review, Thanks.

reflect the discussion from: #4661 (comment)

Comment on lines 1107 to 1109
# negative_pooled_prompt_embeds=negative_pooled_prompt_embeds,
# lora_scale=text_encoder_lora_scale,
# )
Copy link
Member

Choose a reason for hiding this comment

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

Could we maybe delete the commented code?

Copy link
Contributor Author

@xhinker xhinker Aug 24, 2023

Choose a reason for hiding this comment

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

Commented code is removed, and use black to fix the code quality problem.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@xhinker
Copy link
Contributor Author

xhinker commented Aug 25, 2023

@sayakpaul any ideas about what causes the CPU test fail? changes I made is simple one line:

...
negative_prompt = negative_prompt if negative_prompt is not None else ""
...

@sayakpaul sayakpaul merged commit d614120 into huggingface:main Aug 25, 2023
@xhinker
Copy link
Contributor Author

xhinker commented Aug 25, 2023

@sayakpaul Thank You!

AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
* fix sdxl_lwp empty neg_prompt error issue

* fix sdxl_lwp empty neg_prompt error issue, update code format

---------

Co-authored-by: Sayak Paul <[email protected]>
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.

3 participants