Nodes/comfyui-sasolver/SamplerSASolverExperimental
ComfyUI Node

SamplerSASolverExperimental

Renoise, SMEA/Dy, and latent inversion in one node

By mira-6·Created 2 years ago·Updated 2 years ago· 5
SamplerSASolverExperimental
  • model
  • vae
  • SAMPLER
pc_mode
invertfalse
normalizefalse
smeafalse
dynfalse
renoisefalse
renoise_alternativefalse
renoise_scale1.00
renoise_seed0
eta1.00
eta_start_percent0.200
eta_end_percent0.800
scale1.00
shift0.00
gamma1.0

This is the reason to install the mira-6/comfyui-sasolver pack at all. Plain SA-Solver is now baked into ComfyUI core, but this node isn't - it's the pack's own experiment bench, where the SA-Solver predictor-corrector core gets bolted together with a grab-bag of tricks that all roughly do one thing: make the sampler do something extra on alternating steps to punch up detail. The "experimental" in the name isn't a joke. Half the toggles do nothing for a normal workflow, and that's fine once you know the map.

How it works

The engine is the same Adams predictor-corrector as the core SA-Solver node: it keeps a history of denoised latents, predicts with a polynomial, then corrects. You pick pc_mode between PEC and PECE (the latter runs one extra evaluate pass per step), and eta sets how much stochasticity gets injected - 0 turns it into a pure ODE. What makes this node special is what happens on alternating steps:

  • smea + dyn - borrowed from the Euler-Smea-Dyn-Sampler that this pack adapts. On alternating steps it either denoises a 1.25×-upscaled latent (SMEA) or a half-resolution version (Dy), then copies the detail back. Cheap-ish detail injection, the trick that got popular on anime SDXL.
  • renoise - on every other step it adds fresh noise back into the denoised latent, with strength falling as 1 / (renoise_scale * step). This is the renoise trick from the same lineage, and it can rescue over-smoothed output.
  • invert - on alternating steps it decodes the latent through the VAE, inverts the colors, and re-encodes. Yes, that's why the node forces a VAE input. It's a creative img2img-ish flourish, not a detail fix.
  • normalize normalizes the first denoised latent. scale / shift are applied to every denoised output as scale * denoised + shift; gamma widens the sigma step the smea/dy passes use.

The inputs you'll actually set

Output is a single SAMPLER - wire it into the sampler socket on KSamplerCustom or SamplerCustomAdvanced.

  • model + vae - both required. The VAE only matters for invert, but the node won't let you leave it out.
  • pc_mode - PEC or PECE. PECE is the extra-evaluate mode: slightly better per step, slightly slower.
  • eta (1.0) - stochasticity. 0 gives you a deterministic ODE.
  • eta_start_percent / eta_end_percent (0.2 / 0.8) - the window where that stochasticity is active.
  • smea and dyn - turn both on together; that's the detail-injection combo.
  • renoise - the author's tooltip says it best: "scale = 1.05 is recommended for renoise." Enable renoise, set scale to 1.05, leave renoise_seed at 0 (or set -1 for a random seed), and only reach for renoise_alternative if the default lerp version looks wrong.
  • invert - only if you want the color-inversion trick.
  • gamma - 1.0 default; mostly leave it alone.

Install

Same pack, same steps:

cd ComfyUI/custom_nodes
git clone https://github.com/mira-6/comfyui-sasolver

Restart ComfyUI and it shows up under sampling/custom_sampling/samplers. No models to download, no pip requirements - the pack is pure Python.

Where people get burned

  • smea without dyn is a silent no-op. The pack's plain SamplerSASolver node raises an error telling you "Dyn must be true to use smea!"; this experimental node just quietly skips the SMEA branch instead. If you ticked smea and saw nothing change, that's it - turn on dyn.
  • Expect slower generations. Every trick you enable adds extra model forward passes on the affected steps - renoise, SMEA, Dy and invert all cost real time. This is a tinkering node, not a speed run.
  • renoise without raising scale tends to wash output out or add blotchy noise. The 1.05 recommendation exists for a reason.
  • The pack's monkeypatching can fight core SA-Solver. On modern ComfyUI the pack also replaces the underlying sa_solver sampling function, which can break the stock SamplerSASolver node with a TypeError. If you only want this experimental node, install the pack and just avoid the plain one.

If you just want fast SA-Solver sampling, use the core node and skip this pack entirely. Come back here when you're chasing detail on a stubborn generation and don't mind spending a few extra forward passes to get it.

Categorysampling/custom_sampling/samplers

Inputs (17)

NameTypeDefaultDescription
modelMODEL
vaeVAE
pc_modeCOMBO2 options: PEC, PECE
invertBOOLEANfalse
normalizeBOOLEANfalse
smeaBOOLEANfalse
dynBOOLEANfalse
renoiseBOOLEANfalsescale = 1.05 is recommended for renoise.
renoise_alternativeBOOLEANfalse
renoise_scaleFLOAT1.000–100
renoise_seedINT0-1–18446744073709550000
etaFLOAT1.000–100
eta_start_percentFLOAT0.2000–1
eta_end_percentFLOAT0.8000–1
scaleFLOAT1.00-2–2
shiftFLOAT0.00-2–2
gammaFLOAT1.0-10–10

Outputs (1)

NameTypeDescription
SAMPLERSAMPLER