Skip to content

Conversation

chaObserv
Copy link
Contributor

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 be 2 * 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.
    sampler

  • 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.
    order

  • SD3.5 medium grid.
    By utilizing logSNR, it's also compatible with RF models.
    sd3

@comfyanonymous comfyanonymous merged commit aac10ad into comfyanonymous:master Jul 8, 2025
5 checks passed
rakki194 pushed a commit to rakki194/ComfyUI that referenced this pull request Jul 21, 2025
@chaObserv chaObserv deleted the sa_solver_update branch July 22, 2025 08:23
Vander-Bilt pushed a commit to Vander-Bilt/ComfyUI that referenced this pull request Aug 26, 2025
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