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

Feature: Beta scheduler #16235

Merged
merged 8 commits into from
Jul 20, 2024
Merged

Feature: Beta scheduler #16235

merged 8 commits into from
Jul 20, 2024

Conversation

v0xie
Copy link
Contributor

@v0xie v0xie commented Jul 18, 2024

Description

  • This PR implements the scheduler described in "Beta Sampling is All You Need: Efficient Image Generation Strategy for Diffusion Models using Stepwise Spectral Analysis" (2024, Lee et. al). The basic conclusion of the paper is spending more time at the beginning and end of denoising improves image quality.

  • Output images are usually worse than other schedulers at low step count (<= 10), but improved at higher step counts ( >= 20 ).

  • Beta scheduler with alpha = beta = 1.0 is supposed to be equivalent to Uniform scheduler, but in practice the Uniform scheduler produces different sigmas / results.

Changes

  • Add new scheduler "Beta"
  • Adds two options in Sampler Parameters: "Beta scheduler - alpha" and "Beta scheduler - beta"
  • Add "Beta schedule alpha" and "Beta schedule beta" to XYZ plot options
  • Writes alpha/beta to infotext when scheduler is "Beta"

Additional links:

The authors' paper describing the method: https://arxiv.org/abs/2407.12173

Checklist:

Screenshots/videos:

SD XL

xyz_grid-0402-268845887

xyz_grid-0415-2594282800

Panchovix added a commit to Panchovix/stable-diffusion-webui-reForge that referenced this pull request Jul 19, 2024
Panchovix added a commit to Panchovix/stable-diffusion-webui-reForge that referenced this pull request Jul 19, 2024
@v0xie v0xie marked this pull request as ready for review July 19, 2024 22:57
@AUTOMATIC1111 AUTOMATIC1111 merged commit 5a10bb9 into AUTOMATIC1111:dev Jul 20, 2024
3 checks passed
@ibrainventures
Copy link
Contributor

ibrainventures commented Aug 5, 2024

If i load a image by PNG Info Tab, there are correctly the Beta schedule sub-params included:

Beta schedule alpha: 0.45, Beta schedule beta: 0.8, Version: v1.10.1

But those params are not respected by System after pressing "Send to txt2img".
There are still the "system saved params" (which are as example 0.5 / 0.7 saved) active.
Which gives a different output..

Is it possible to include / resepect those image-specific params?

Thanks for this scheduler, which is really a great scheduler type.

@lawchingman lawchingman mentioned this pull request Oct 5, 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.

3 participants