Nodes/comfy-switch-samplers/StepSwitchKSampler
ComfyUI Node

StepSwitchKSampler

One Node, Two Samplers, No Manual Handoff

By azazeal04·Created 11 months ago·Updated 11 months ago· 4
StepSwitchKSampler
  • model1
  • model2
  • positive
  • negative
  • latent_image
  • LATENT
seed0
total_steps20
switch_point10
sampler_before
sampler_after
scheduler_before
scheduler_after
cfg_before7.5
cfg_after7.5
denoise_before1.00
denoise_after1.00

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_after below 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 model1 is SDXL and model2 is 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.

CategoryAzazeal / Switch Samplers

Inputs (16)

NameTypeDefaultDescription
model1MODEL
model2MODEL
positiveCONDITIONING
negativeCONDITIONING
seedINT00–18446744073709550000
total_stepsINT20
switch_pointINT10
sampler_beforeCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
sampler_afterCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
scheduler_beforeCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
scheduler_afterCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
cfg_beforeFLOAT7.50–20
cfg_afterFLOAT7.50–20
denoise_beforeFLOAT1.000–1
denoise_afterFLOAT1.000–1
latent_imageLATENT

Outputs (1)

NameTypeDescription
LATENTLATENT