Nodes/raylight/SamplerSASolver (Ray)
ComfyUI Node

SamplerSASolver (Ray)

The Fast Sampler That Cuts Steps Without the Quality Hit

By komikndr·Created about a year ago·Updated 2 days ago· 409
SamplerSASolver (Ray)
  • ray_actors
  • SAMPLER
eta1.00
sde_start_percent0.200
sde_end_percent0.800
s_noise1.00
predictor_order3
corrector_order4
use_pece
simple_order_2

If you're sampling a flow or diffusion model and want 8–15 steps instead of 20–30 without the image falling apart, SA-Solver is one of the strongest tools for the job. It's a predictor-corrector family that averages solver steps (hence "Solver-Averaged") to stay accurate at low step counts. ComfyUI ships it in comfy.k_diffusion.sa_solver; RaySamplerSASolver wraps it for Raylight and returns a proper SAMPLER you can plug into the sampler slot of any KSampler.

Eight inputs, and it's worth knowing which four actually matter:

  • eta (default 1.0) - noise level for the SDE (stochastic) portion. Higher = more variation, more texture, less determinism. 1.0 is the classic SDE setting.
  • sde_start_percent / sde_end_percent (defaults 0.2 / 0.8) - the denoising window where the solver runs in SDE (noisy) mode. Outside that window it runs deterministic ODE mode. The default window means the middle of sampling gets the stochastic treatment - that's the standard recipe for quality at low steps.
  • s_noise (default 1.0) - the noise scale injected during the SDE window.
  • predictor_order (default 3) and corrector_order (default 4) - how many previous steps each predictor/corrector stage remembers. Higher order = more accurate but more memory and compute. The defaults are already on the aggressive end, tuned for quality.
  • use_pece and simple_order_2 - two on/off refinements. use_pece enables the "PECE" corrected extrapolation (a specific solver-averaged scheme); simple_order_2 is a cheaper second-order mode. If a workflow tells you to set them, set them; otherwise the defaults (off) are the standard SA-Solver config.

The node builds its sampler via get_tau_interval_func(start_sigma, end_sigma, eta=eta) - i.e., it converts your percent window into the sigma interval the solver needs, and hands back a configured SAMPLER.

Where it fits

The Raylight/extra/custom_sampling/samplers category tells the story: this is the distributed port of the SA-Solver sampler node. Use it wherever you want low-step generation on models that tolerate it - distilled checkpoints especially love it, since they're made for few steps. Wire the SAMPLER output into the sampler input of a Ray KSampler.

Install

Part of raylight:

cd ComfyUI/custom_nodes
git clone https://github.com/komikndr/raylight
cd raylight
pip install -r requirements.txt

Restart, or install "raylight" via ComfyUI Manager.

Gotchas

  • sde_start_percent must be ≤ sde_end_percent. Set them backwards and the SDE window inverts into something the tau function won't build sensibly.
  • Unlike the patch nodes, this returns SAMPLER, not ray_actors - it's the sampler half of custom sampling, so it pairs with a scheduler and a guider from the same Raylight custom-sampling section.
  • On flow-matching models (Flux, Qwen), check your scheduler isn't one of the ones that ignores the sigma window - a custom sigma-shifting scheduler can make your carefully set SDE window land somewhere unexpected.
CategoryRaylight/extra/custom_sampling/samplers

Inputs (9)

NameTypeDefaultDescription
ray_actorsRAY_ACTORS
etaFLOAT1.000–10
sde_start_percentFLOAT0.2000–1
sde_end_percentFLOAT0.8000–1
s_noiseFLOAT1.000–100
predictor_orderINT31–6
corrector_orderINT40–6
use_peceBOOLEAN
simple_order_2BOOLEAN

Outputs (1)

NameTypeDescription
SAMPLERSAMPLER