Skip to content

[SDXL Inpaint] Correct strength default #4858

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 1 commit into from
Aug 31, 2023

Conversation

patrickvonplaten
Copy link
Contributor

@patrickvonplaten patrickvonplaten commented Aug 31, 2023

What does this PR do?

SDXL inpainting rarely works well with strength=1.0 which surprises many users. The default was copied from SD v1-5. This PR changes the default to 0.9999, to make sure at least some part of the original image is kept in the masked area.

@HuggingFaceDocBuilderDev

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

@patrickvonplaten patrickvonplaten deleted the correct_strength_default_sd_xl branch September 1, 2023 13:12
@JohanHuynh0130
Copy link

hi @patrickvonplaten , thanks for fixing this issue it took me a while to figure it out. However, changing the strength to 0.9999 somehow also change the color grading or (Adding grain?) to the final output. Here are some of the example:

Photo to be inpainted:
furniture4-min

Mask:
furniture4-mask

Some of the result:
original_10

For the non-masked, the image stays the same but you can see it has a weird grading onto it. Or maybe it's because of my resize function (basic PIL resize)

@patrickvonplaten
Copy link
Contributor Author

Hmm you don't have this when using strength=1.0? Maybe it's also the watermarker that causes these red/green dots

@YQYI
Copy link

YQYI commented Oct 24, 2023

this change makes my result totally different........, it tooks me a while to fix that.....

@garychan22
Copy link

@YQYI how do you fix it, using strength = 0.9999?

yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
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