Add reconstructed SA-Solver sampler #8834
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a remake of the previous #4454, introducing arbitrary-order, k-diffusion looping style, and logSNR computation. The previous PR simply adapted the official code to ComfyUI, while this one rewrites the computations to support arbitrary order (beyond 4), which is generally not useful, though. It's still submitted as a new PR.
By default, SA-Solver performs stochastic sampling (SDE) only in a limited interval (0.2 ≤ t ≤ 0.8), producing images with structure and composition that can be similar to ODE sampling.
PECE mode performs an additional evaluation per step to update the denoised output based on the corrected. Since the correction starts from step
i = 1
, NFE will be2 * steps - 1
.SDXL sampler grid.

Both "ODE" and "full SDE" modes can be used by adjusting
eta
and the interval in the sampler node.The total number of scheduled steps is fixed this time, as PECE is an extension.
SDXL order grid.

"p" and "c" correspond to the orders of the predictor and corrector.
Higher orders may require smaller step sizes, FP64, and PECE mode for stability.
Simple-2 refers to the modified order-2 computations proposed by SA-Solver. It's disable by default in this PR.
SD3.5 medium grid.

By utilizing logSNR, it's also compatible with RF models.