Single Float Range Loop
Step a float through a range — for the settings that refuse to be integers
- value
- current_index
- total_combinations
- current_combination
Some sweeps are integers and some aren't, and the "aren't" ones are often where the real gains hide. CFG at 3.5 vs 4.0, denoise at 0.5 vs 0.6, a timestep shift at 5.5 vs 6.5 - you can't step those with the int loop. SingleFloatLoop is the float version: it walks a value through a range with a decimal step, one value per queue run, and hands it to whatever input you wire it into.
It's the quiet workhorse of KY-2000's RES4LYF-tester-loop pack. The pack is best known for sweeping RES4LYF samplers and schedulers, but this node doesn't care about RES4LYF at all - it's a plain, reliable range loop that shines whenever you're fine-tuning a continuous parameter across a handful of runs instead of guessing at a single value.
How it works
Each execution advances a counter and emits the next value from an inclusive range: start through end stepping by step, rounded to six decimal places to dodge float drift - that's the 0.1 accumulation bug that makes naive loops come out with 0.30000000000000004; this one won't. Descending ranges work (start: 2.0, end: 0.5 steps down), and negative step handling is normalized for you. mode selects sequential, random (seeded via seed), or ping_pong; reset (true) restarts the counter.
Outputs: value (the FLOAT you connect onward), plus current_index, total_combinations, and a current_combination string for captions or filenames.
The inputs that matter
start/end/step- the range; step minimum is 0.000001.mode- sequential / random / ping_pong.seed- reproducible random mode.reset- start over.
Install
From the pack repo, in ComfyUI/custom_nodes/:
cd ComfyUI/custom_nodes/
git clone https://github.com/KY-2000/RES4LYF-tester-loop.git
Restart ComfyUI. No dependencies, no model downloads; the node works whether or not you have RES4LYF installed.
Where people get burned
Same shared-state gotcha as its sibling: all instances of the class use one counter, so two SingleFloatLoop nodes in one workflow advance together. Keep one sweep at a time. Also worth remembering before you queue a big sweep - the node's total_combinations output tells you exactly how many runs you're about to commit to. With float ranges it's easy to build a step that implies hundreds of runs without noticing; read the counter first.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | 3 options: sequential, random, ping_pong | |
| start | FLOAT | 0.00-1000000000–1000000000 | — |
| end | FLOAT | 5.00-1000000000–1000000000 | — |
| step | FLOAT | 1.000.000001–1000000 | — |
| seed | INT | 00–18446744073709550000 | — |
| reset | BOOLEAN | false | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| value | FLOAT | — |
| current_index | INT | — |
| total_combinations | INT | — |
| current_combination | STRING | — |