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 Request]: Make "Karras schedule" as an setting section for sampler #10621

Closed
1 task done
KohakuBlueleaf opened this issue May 22, 2023 · 2 comments
Closed
1 task done
Labels
enhancement New feature or request

Comments

@KohakuBlueleaf
Copy link
Collaborator

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

For now, we have lot of sampler from k_diffusion that has an "karras" variation which use karras schedule for the sigmas.

But, as mentioned by @Birch-san on twitter, the source code on k_diffusion and the previous issue about sigmas setting for karras scheduler. It is clear that karras scheduler should not be a "boolean" option.
(Also, some paper has said that let timestep=T has snr=0 is better than what SD have now. and snr=0 is sigma_max=inf, so let user to set sigma_max max may be a good idea)

So I am considering something like: make karras scheduler as a option like hires fix, when you enable it you will get some extra setting (slider or number input) for it.

Or we can even expand this idea to: let user choose different type of sigmas scheduler and control the parameters for them.

Proposed workflow

  1. there will be an checkbox aside hires fix.
  2. enable the checkbox and will toggle karras schedule
  3. you can set sigma_min/sigma_max/rho for karras schedule

additional:
make a dropdown for choosing different sigma schedule

Additional information

ref:
Elucidating the Design Space of Diffusion-Based Generative Models
Common Diffusion Noise Schedules and Sample Steps are Flawed

If I have enough time I will try to impl it first and make a PR for it.

@KohakuBlueleaf KohakuBlueleaf added the enhancement New feature or request label May 22, 2023
@KohakuBlueleaf
Copy link
Collaborator Author

xyz_grid-0007-3259848376-watercolor20ink20original20illustration20best20quality20masterpiece20dynamic20angle20detailed20beautiful20background20depth20of20field
image-30
image-32

Prototyping.

@KohakuBlueleaf
Copy link
Collaborator Author

The difference between different sigma max is huge may because the CompVisEPSDenoiser will automatically change sigma to T by the alpha schedule
And use large sigma max may need the fixed alpha schedule specified in Common Diffusion Noise Schedules and Sample Steps are Flawed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants