ClownsharkChainsampler
Hand one sampler's latent to the next
- model
- positive
- negative
- sigmas
- latent_image
- guides
- options_group
- output
- denoised
- options
The chainsampler is one of RES4LYF's genuinely clever tricks, and it's what the readme is showing off when it mentions "chainsamplers." The idea: run part of your denoise with one sampler, then hand the half-finished latent to another sampler that finishes it with different settings - a different solver, a different eta, a different CFG. You chain several of these back to back and each stage does its own job. Think of it as multi-stage sampling without stitching together three separate KSamplers and juggling denoise fractions by hand.
Where you'd reach for it: you want a fast multistep solver to lock in composition for the first chunk of steps, then switch to a slower, higher-accuracy res_s solver to refine detail - all on one trajectory, no re-noising in between. Or you're doing unsample-then-resample work and want fine control over the resample leg.
How it works
Each Chainsampler picks up where the previous one left off. That's why its sampler_mode defaults to resample (not standard) and its steps_to_run defaults to -1, meaning "run whatever steps are left." You set a stage to consume, say, the first 10 steps, and pass the rest down the chain. The first node in the chain is the one you feed the model, conditioning, sigmas and latent into; downstream nodes inherit the state through the chain.
The inputs and outputs that matter
- sampler_name (default
multistep/res_2m) - the solver for this stage. Note the category-prefixed naming (multistep/,exponential/,linear/…);res_2mis still the safe workhorse. - steps_to_run (default -1) - how many steps this stage eats.
-1= all remaining. This is the knob that makes chaining work: give stage one a fixed count, let the last stage take the rest. - cfg (default 5.5) and eta (default 0.5) - per-stage guidance and SDE noise. The point of chaining is that these can differ between stages.
- bongmath (default true) - leave it on. It aligns each substep's latents with the noise predictions as it goes, so denoising effectively runs forwards and backwards at once. The author's own framing; it's a more accurate result for no extra VRAM and no extra time. Set-and-forget.
Optional inputs cover the first-stage plumbing: model, positive, negative, sigmas, latent_image, and guides. Outputs are output (the latent so far, to pass down-chain or decode), denoised, and options for wiring RES4LYF's option nodes through the chain.
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 your venv (or portable Python), restart, hard-refresh F5. No model downloads.
Common issues
The mental model is the thing to get right: a chainsampler is a continuation, so its default mode is resample. If you drop a single one in and expect it to sample from scratch like a KSampler, you'll get confused results - the first real generation node in your chain has to establish the latent and sigmas the chain then continues. Feed the model/conditioning/sigmas/latent into the first link. And the usual RES4LYF caveat holds: the readme is thin on worked examples, so grab the "intro to clownsampling" example workflow from the repo and study how the chain is wired before building your own. If the node won't load, the pack isn't installed.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| eta | FLOAT | 0.50-100–100 | Calculated noise amount to be added, then removed, after each step. |
| 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 |
| steps_to_run | INT | -1-1–10000 | — |
| cfg | FLOAT | 5.50-10000–10000 | Negative values use channelwise CFG. |
| sampler_mode | COMBO | resample | 2 options: unsample, resample |
| bongmath | BOOLEAN | true | — |
| modelopt | MODEL | — | |
| positiveopt | CONDITIONING | — | |
| negativeopt | CONDITIONING | — | |
| sigmasopt | SIGMAS | — | |
| latent_imageopt | LATENT | — | |
| guidesopt | GUIDES | — | |
| options_groupopt | COMFY_AUTOGROW_V3 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| output | LATENT | — |
| denoised | LATENT | — |
| options | OPTIONS | — |