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 seed resizing to community pipelines #1011

Conversation

MarkRich
Copy link
Contributor

@MarkRich MarkRich commented Oct 27, 2022

Part of #875 and bigger story #841

The code is 1:1 with core stable_diffusion pipeline, the only difference starting around line 265 in the pipeline file.

In order to achieve seed stability, we simply generate the original 512 x 512 seed, generate a second seed of arbitrary size, and then paste the first seed into the second seed. This yields greater stability.

As an example, generating: "A painting of a futuristic cop", we get

Reference image, 512 x 512:
seed_resize_512_512_image

Stable seed image, 512 x 592:
seed_resize_512_592_image

Non stable seed image, 512 x 592:
seed_resize_512_592_image_compare

So! Not exactly / 100% the same (though automatic111 did not claim it to be) but certainly seems much more stable with this approach.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 27, 2022

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

@patrickvonplaten
Copy link
Contributor

Very cool!

@patrickvonplaten patrickvonplaten merged commit 1fc2088 into huggingface:main Oct 29, 2022
PhaneeshB pushed a commit to nod-ai/diffusers that referenced this pull request Mar 1, 2023
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