Sampler Loop
Testing samplers the lazy way
- sampler
- current_index
- total_combinations
- current_combination
First, unlearn the name. Sampler Loop doesn't loop the way you're hoping it does. It won't sit there and render a 44-image grid while you make coffee. It hands your KSampler one sampler per workflow run, and when you queue the workflow again it hands you the next one. That's the entire trick, and it's the thing nearly every first-time user trips on - there's a whole r/comfyui help thread titled "howto use sampler scheduler loop?" where the answer boils down to "run it again, it rolls forward."
Which, honestly, is still great. Want to know whether dpmpp_2m or dpmpp_2s_ancestral treats your model better? Normally you'd rebuild the graph, or hand-edit the sampler dropdown between runs like a caveman. This node makes that a one-button exercise: wire its sampler output into your KSampler, hit queue, and let ComfyUI feed you a different sampler each time. It's the workflow-native version of A/B testing, and it's from a small pack that builds on the older comfyui-wanvideo-scheduler-loop by tankenyuen-ola.
How it actually works
The node keeps an internal counter - one per mode - and only advances it when it detects a new execution. The dedup is a timestamp-plus-thread ID, which sounds fancy but means one thing in practice: a single queue run returns a stable value, and the next run gives you the next value. No manual step input, no "increment by 1" wiring. You just re-run.
Three modes, all driven by that counter:
- sequential - walks the list in order, wrapping around when it hits the end (
step % count). - random - picks a sampler using
seed + step, so it's reproducible and changes each run. Seed 0 with the same count gives you the same "random" sequence every time. - ping_pong - goes forward, then back, then forward again. It's there for workflows that want smooth neighbor-to-neighbor transitions, and honestly it's a niche of a niche.
The reset boolean zeroes the counter - flip it, run once, flip it back, and you're at the top of the list.
The inputs and outputs that matter
- mode - sequential, random, or ping_pong. You'll live in sequential.
- seed - only matters for random mode. Standard ComfyUI seed range.
- reset - a BOOLEAN, defaults to false. Toggle it to start a fresh cycle.
- skip_samplers - a multiline string of comma-separated sampler names to exclude.
euler, dpm_2, lcm. Case-sensitive, soEulersilently does nothing.
Outputs: sampler (a plain string, which is exactly what a stock KSampler's sampler input wants), plus current_index, total_combinations, and current_combination - the last one being a human-readable "Sampler: dpmpp_2m" string you can shove into a filename or a text display node if you like labeling your grid.
Installing it
No pip dependencies, no model downloads, nothing to babysit - it's pure Python over ComfyUI's own sampler lists. Easiest path:
- ComfyUI Manager → "Install Custom Nodes" → search comfyui-ksampler-tester-loop (or "Sampler Scheduler Loop" - the pack shows up under a few names).
- Restart ComfyUI.
Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/KY-2000/comfyui-ksampler-tester-loop
then restart. That's it. The repo has no requirements.txt, which is rarer in this ecosystem than it should be.
Where people get burned
- Expecting iteration, getting one image. Re-queue the workflow, or queue it N times in one go, and each run uses the next sampler. This is the #1 confusion, and it applies to every node in this pack.
- Skip list not skipping. Names must match ComfyUI's list exactly - check the console, the node logs a warning for every name it doesn't recognize.
- Skipping everything. If your skip list excludes all 44 samplers, the node silently falls back to the full list instead of erroring. Cute, but easy to misread as "my workflow is broken."
One small note: every run prints a couple of lines to the console about what it picked. Fine for debugging, mildly noisy if you're queueing a hundred runs - don't panic when you see it.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | 3 options: sequential, random, ping_pong | |
| seed | INT | 00–18446744073709550000 | — |
| reset | BOOLEAN | false | — |
| skip_samplersopt | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| sampler | euler,euler_cfg_pp,euler_ancestral,euler_ancestral_cfg_pp,heun,heunpp2,exp_heun_2_x0,exp_heun_2_x0_sde,dpm_2,dpm_2_ancestral,lms,dpm_fast,dpm_adaptive,dpmpp_2s_ancestral,dpmpp_2s_ancestral_cfg_pp,dpmpp_sde,dpmpp_sde_gpu,dpmpp_2m,dpmpp_2m_cfg_pp,dpmpp_2m_sde,dpmpp_2m_sde_gpu,dpmpp_2m_sde_heun,dpmpp_2m_sde_heun_gpu,dpmpp_3m_sde,dpmpp_3m_sde_gpu,ddpm,lcm,ipndm,ipndm_v,deis,res_multistep,res_multistep_cfg_pp,res_multistep_ancestral,res_multistep_ancestral_cfg_pp,gradient_estimation,gradient_estimation_cfg_pp,er_sde,seeds_2,seeds_3,sa_solver,sa_solver_pece,ddim,uni_pc,uni_pc_bh2 | — |
| current_index | INT | — |
| total_combinations | INT | — |
| current_combination | STRING | — |