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 SA-Solver Sampler #4454

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

chaObserv
Copy link

Add SA-Solver by applying modifications of Comfy's UniPC whose source code is also based on DPM-Solver.

SA-Solver could be considered as a stochastic version UniPC with same order. When set eta = 0 constantly, its result is similar to UniPC (bh1).

The default tau function is adapted from official's repos and uses sigma percent to define interval.

Example (with --fp8_e5m2-unet):
sa_example

@chaObserv chaObserv marked this pull request as draft August 23, 2024 08:20
@chaObserv
Copy link
Author

I would convert this to a simplified version.

@chaObserv
Copy link
Author

Extract sample functions and simplified the process, which makes it fit into k_diffusion. Instead of passing percent to sample function, SamplerSASolver node requires a model now to compute interval of tau function.

Landscape example:
sa_grid_00001_

Anime-style example:
sd_grid_02_00001_

@chaObserv chaObserv marked this pull request as ready for review August 23, 2024 14:46
@mcmonkey4eva mcmonkey4eva added User Support A user needs help with something, probably not a bug. and removed User Support A user needs help with something, probably not a bug. labels Sep 12, 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.

2 participants