Parameters Range Loop
Steps + CFG + shift in one sweep, built for Wan
- steps
- cfg
- shift
- current_index
- total_combinations
- current_combination
Parameters Range Loop is the middle child of this pack's WanVideo trio: it sweeps steps, CFG, and shift together, which is one more knob than the tiny Float Range Loop but a lot fewer than the all-in-one All Parameters Loop. It's what you want when you're not just hunting a CFG/shift sweet spot but also want to know how many steps you actually need at that spot.
Step counts genuinely vary by setup with Wan - full-quality workflows land around 20–30 steps, speed-LoRA setups drop to 3–8 - and the "right" count depends on your CFG and shift. That's a three-variable interaction, which is exactly the sort of thing hand-editing does badly and a range node does without thinking.
How it works
Same family machinery as the rest of the pack: build three value lists (steps from steps_start to steps_end by steps_interval, CFG by its range, shift by its range), enumerate every combination sequentially, and hand the next one out on each workflow run. Floats get rounded to two decimals so ranges don't drift. There's no mode selector - sequential only - plus a seed that only matters to the pack's random modes and a reset boolean (default false) that restarts the counter when you want a clean sweep.
Combination order is steps → CFG → shift, so shift changes fastest. Wrap-around at the end means the loop never dies; it just cycles. One run, one combination - the pack's universal rule. Queue the workflow repeatedly to walk the whole grid.
Inputs
- steps_start / steps_end / steps_interval - integers, defaults 20 / 50 / 5. A 7-value sweep out of the box.
- cfg_start / cfg_end / cfg_interval - floats, defaults 1 / 8 / 1.
- shift_start / shift_end / shift_interval - floats, defaults 1 / 3 / 0.5.
- seed, reset - the usual.
Outputs: steps (INT), cfg (FLOAT), shift (FLOAT) - wire all three into your WanVideo sampler - plus current_index, total_combinations, and current_combination (a "20 steps, CFG 4.00, Shift 2.00" string) for labeling your runs. Defaults multiply to 7 × 8 × 5 = 280 combinations, so keep your ranges honest or you'll be queueing for a while.
One naming note, because it'll trip you up once: this node uses _interval for the step size, while the sibling Float Range Loop uses _step. Same idea, different words - that's the pack, not you being confused.
Install
No dependencies, no models - pure Python over ComfyUI's own machinery. Via ComfyUI Manager, search comfyui-ksampler-tester-loop (or "Sampler Scheduler Loop") and restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/KY-2000/comfyui-ksampler-tester-loop
then restart ComfyUI. That's the whole install; the repo ships with no requirements.txt, which is blessedly rare.
The gotcha, for the last time
"Loop" = one combination per queue run. It won't internally iterate and render a batch of outputs in a single execution - to walk the grid you re-queue the workflow (or queue it N times in one go), and each run uses the next combination. The console logs each pick, which is genuinely useful when you're 150 runs in and can't remember what the current one is testing.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| steps_start | INT | 201–1000 | — |
| steps_end | INT | 501–1000 | — |
| steps_interval | INT | 51–100 | — |
| cfg_start | FLOAT | 1.00–30 | — |
| cfg_end | FLOAT | 8.00–30 | — |
| cfg_interval | FLOAT | 1.00.1–10 | — |
| shift_start | FLOAT | 1.00–10 | — |
| shift_end | FLOAT | 3.00–10 | — |
| shift_interval | FLOAT | 0.50.1–5 | — |
| seed | INT | 00–18446744073709550000 | — |
| reset | BOOLEAN | false | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| steps | INT | — |
| cfg | FLOAT | — |
| shift | FLOAT | — |
| current_index | INT | — |
| total_combinations | INT | — |
| current_combination | STRING | — |