-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Support res_multistep_ancestral on RF and fix its discretization #9444
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
base: master
Are you sure you want to change the base?
Conversation
The main reason that changes the result of SDXL is the first step, which currently performs an ODE update all the time. |
Thanks for the catch. Restored the first stochastic step to its previous one. Does not feel clean but checked it produces the same on SDXL. |
This is good but I think people might complain it breaks their workflows since res_multistep is a popular sampler to use with rf models and this changes the output a bit. |
ye some also might prefer the old integral, in that case would it be acceptable to make a separate function for ancestral like the current implementations of other samplers |
Alternatively, |
Yeah there would be multiple options if we want to keep the old res_multistep as it is, for ex:
Choice would depend on the preference of naming and confusion between samplers. I think both is fine, not sure which would be preferred though |
dpmpp_2m_sde_heun is good if it really is the same thing. |
Thanks for the opinion. I opened a new pull request in #9542 adding |
Current implementation of
res_multistep_ancestral
sampler seems not to work appropriately with RF-based models.The original RES paper formulates its theory in VE format, and this restores VP/RF-style formulation of RES in which alpha appears, with
eta
accordingly to match the definition of the one already indpmpp_2m_sde
. Another change is the integrating variable from negative log-sigma to actual negative log-SNR.This results in small difference in ODE sampling (no changes in VE) like in the other samplers, but makes notable difference in stochastic samplers on both RF and VE models. I've checked some results on FLUX Krea and SDXL and it seems to produce images well on ancestral sampling while keeping similar aesthetics in both models.
Example results in FLUX Krea:
Example results in SDXL: