StepSwitchKSampler
One Node, Two Samplers, No Manual Handoff
- model1
- model2
- positive
- negative
- latent_image
- LATENT
You've probably had the thought: run the first half of a generation with one sampler and the second half with another. The community has been hand-building that for years - two KSamplers, a decode, a re-encode, a pile of reroutes. StepSwitchKSampler stuffs the whole thing into one box.
It's the two-stage member of the Azazeal / Switch Samplers pack, aimed at same-family checkpoints (SDXL and its variants). model1 runs switch_point steps with its own sampler/scheduler/CFG, then model2 takes over for the remaining total_steps - switch_point steps. The README's example: 10 steps of Euler on SDXL, then 10 steps of DPM++ 2M Karras for refinement.
How it actually works
Here's the honest bit: this isn't a true mid-trajectory handoff that splits one sigma schedule in half. It chains two full ComfyUI KSampler calls in a row, passing the first stage's latent to the second. That's fine - it's exactly what people did by hand - but it changes how you should set things up.
The knob that decides whether the switch means anything is denoise_after. Leave it at the default 1.0 and stage 2 adds fresh noise on top of stage 1's latent, which mostly drowns the first result - you get two stacked generations, not a refinement. Drop it to 0.5–0.7 and stage 2 becomes a real img2img polish of what stage 1 built. That single detail is where most people burn an evening.
The inputs that matter
The full schema is big but the ones you actually touch:
- total_steps and switch_point - where the handoff happens (defaults 20 and 10).
- sampler_before/after and scheduler_before/after - your two recipes. Euler for structure, DPM++ 2M Karras for the polish pass is the classic SDXL combo.
- denoise_before/after - set
denoise_afterbelow 1.0, see above. - cfg_before/after - handy for the high-CFG-then-lower-CFG trick; SDXL lives happily at 5–9.
- model1 and model2 - both are required by the schema even though the code quietly falls back to model1 if model2 is missing. Wire both; it's not optional in the UI.
- positive, negative, seed, latent_image - one conditioning pair shared by both stages.
The output is a single LATENT, same as any KSampler - drop it into a VAE Decode and carry on.
Installing it
This is the whole pack, and it's refreshingly boring to install - no requirements.txt, no model downloads, nothing but ComfyUI core under the hood:
cd ComfyUI/custom_nodes
git clone https://github.com/azazeal04/comfyui-switch-samplers.git
Then restart ComfyUI. Or use ComfyUI Manager and search for comfyui-switch-samplers. Either way, the nodes land under Azazeal / Switch Samplers in the Add Node menu.
Where people get burned
- denoise_after at 1.0 - stage 2 restarts instead of refining. Already covered, but it's worth saying twice.
- Cost illusion. A 20-step split isn't cheaper than one 20-step run; it's two full sampling passes, and stage 2 re-loads a second model. Budget accordingly.
- Same family only. If
model1is SDXL andmodel2is Flux, their VAEs are incompatible and this node won't bridge them - that's what the pack's Cross nodes are for. - The seed increments (stage 2 runs
seed + 1), so changing the split changes everything downstream. Reproducible, just know it's there.
If your real goal is blending different architectures, skip this one and grab CrossStepSwitchKSampler. But for two checkpoints of one family - or one checkpoint with two sampler personalities - this is the node to reach for.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| model1 | MODEL | — | |
| model2 | MODEL | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| seed | INT | 00–18446744073709550000 | — |
| total_steps | INT | 20 | — |
| switch_point | INT | 10 | — |
| sampler_before | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| sampler_after | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler_before | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| scheduler_after | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| cfg_before | FLOAT | 7.50–20 | — |
| cfg_after | FLOAT | 7.50–20 | — |
| denoise_before | FLOAT | 1.000–1 | — |
| denoise_after | FLOAT | 1.000–1 | — |
| latent_image | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |