ClownOptions Swap Sampler
Switch solvers mid-denoise
- options
- options
This is a small options node with a specific, useful job: it tells a RES4LYF sampler to swap to a different solver partway through denoising. You configure the swap on this node, output an OPTIONS bundle, and plug that into your Clown sampler's options input. The sampler then starts with whatever solver you gave it and switches to the one named here at the point you specify.
Why would you want that? Because the early and late phases of denoising reward different things. A robust, fast solver is great for laying down structure in the first steps; a higher-order one can clean up detail toward the end. Rather than run two separate samplers and manage the handoff (that's what the Chainsampler is for), the swap option lets a single sampler change solvers on the fly. It's the lighter-weight way to get a two-phase effect.
How it works
The zero-CTR here tells you this is a deep-cut node most people scroll past - it's an option modifier, not a headline sampler, so it doesn't show up in "getting started" tutorials. But the mechanism is simple. It watches either the step count or the solver's error estimate, and when the condition trips, it swaps.
The inputs and output
- sampler_name (default
multistep/res_2m) - the solver to swap to, chosen from RES4LYF's full 119-entry list. - swap_at_step (default 30) - swap when this step is reached. The straightforward trigger: run the original solver up to here, then switch.
- swap_below_err (default 0) - the other trigger. Swap once the solver's per-step error estimate drops below this value. Left at 0, this is effectively off and the step-based swap governs; raise it if you'd rather swap on convergence than on a fixed step.
- log_err_to_console (default false) - flip this on temporarily to print the running error to the console, which is how you'd pick a sensible
swap_below_errin the first place.
The optional options input lets you chain this behind other RES4LYF option nodes. The single output is options (OPTIONS) - wire it into your sampler.
Installing it
ComfyUI Manager: search RES4LYF, install, restart. Or manually:
cd custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF/
cd RES4LYF
pip install -r requirements.txt
pip install inside the venv (or portable Python), restart, hard-refresh F5. No downloads.
Common issues
This does nothing on its own - its output has to reach a sampler's options input, and if you leave that wire off, the swap silently never happens. The two triggers can also fight: if you set swap_below_err above 0 and swap_at_step, whichever condition trips first wins, so pick the one you actually mean and leave the other neutral. And if you don't understand why you'd swap solvers at all, you probably don't need this node yet - it's a refinement for people already comfortable with the pack, not a starting point. If it's missing entirely, RES4LYF isn't installed.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| sampler_name | COMBO | multistep/res_2m | 119 options: none, multistep/res_2m, multistep/res_3m, multistep/dpmpp_2m, multistep/dpmpp_3m, multistep/abnorsett_2m, +113 |
| swap_below_err | FLOAT | 0.00-100–100 | Swap samplers if the error per step falls below this threshold. |
| swap_at_step | INT | 301–10000 | — |
| log_err_to_console | BOOLEAN | false | — |
| optionsopt | OPTIONS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| options | OPTIONS | — |