Skip to content

Support Skip Layer Guidance (SLG) for Stable Diffusion 3.5 Medium #2590

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

Conversation

Czxck001
Copy link
Contributor

@Czxck001 Czxck001 commented Nov 1, 2024

This closes #2588 .

I noticed SLG doesn't perform well when number of inference steps is low. So, below is a comparison with --num-inference-steps=50.

w/o SLG w/ SLG
out-50-no-slg out-50-slg

Appearantly the fingers look better. This could be an evidance that supports claimed benefits (improved anatomy). But other aspects of the image changes, too.

The SLG parameter is copied from that in SD3 reference design, which is originally with dpmpp_2m sampler (not Euler sampler in the Candle example here). So, it might be worth to tweak the parameters with more experiments.

@LaurentMazare LaurentMazare merged commit 530ab96 into huggingface:main Nov 1, 2024
10 checks passed
@LaurentMazare
Copy link
Collaborator

Thanks, neat addition!

@Czxck001 Czxck001 deleted the support-slg-for-sd3.5-medium branch November 1, 2024 17:19
EricLBuehler pushed a commit to EricLBuehler/candle that referenced this pull request Nov 26, 2024
…ggingface#2590)

* support skip layer guidance (slg) for stable diffusion 3.5 medium

* Tweak the comments formatting.

* Proper error message.

* Cosmetic tweaks.

---------

Co-authored-by: Laurent <[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.

Support Skip Layer Guidance (SLG) for Stable Diffusion 3.5 Medium
2 participants