Double Float Range Loop
Grid-search two float settings in one pass
- value1
- value2
- current_index
- total_combinations
- current_combination
Every now and then you need to find a sweet spot in two continuous settings at once - CFG and denoise, or shift and strength - and testing them independently misses the interaction. DoubleFloatRangeLoop is the two-axis float version of the pack's range loops: it walks the Cartesian product of two float ranges, handing you a value1 and value2 per run so a batch of images covers the whole grid.
It's part of KY-2000's RES4LYF-tester-loop pack. Like the other range nodes it doesn't need RES4LYF to be useful - it's a generic iteration helper - but it lives in the pack because the whole point of that repo is making sweeps painless, and a two-float grid is one of the more painful things to do by hand.
How it works
Each execution advances a flat counter and maps it onto two ranges: value1's index is counter ÷ length(value2 range), value2's index is the remainder, so the walk is ordered and complete - every value1 pairing runs through all of value2 before value1 steps. Ranges are inclusive, descending works, and both are rounded to six decimal places to avoid float accumulation drift (this is where a naive step loop silently lands on 0.30000000000000004 and this one doesn't). total_combinations is the product of the two range sizes, reported up front. reset (true) restarts the grid.
Outputs: value1, value2, current_index, total_combinations, and a current_combination string like value1 0.5, value2 1.2 you can push into a label or filename node.
The inputs that matter
value1_start/value1_end/value1_stepand the matchingvalue2_trio - the two ranges; float steps down to 0.000001.seed- accepted, but this node is sequential-only, so it's a no-op in practice.reset- restart from the first combination.
Install
cd ComfyUI/custom_nodes/
git clone https://github.com/KY-2000/RES4LYF-tester-loop.git
Restart ComfyUI. No dependencies, no model downloads - plain stdlib Python.
Where people get burned
Same caveat as its int sibling: this is a strictly sequential grid - the seed input does nothing and there's no random or ping_pong mode, so if you want randomized sampling you're in the wrong node. The good news: unlike DoubleIntRangeLoop, its reset actually works (that one has a NameError bug in the shipped code). Before you queue anything, glance at total_combinations - float ranges make it trivial to specify a grid of a few hundred runs without meaning to, and a quick step-size sanity check beats discovering it after the queue's already churning.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| value1_start | FLOAT | 0.00-1000000000–1000000000 | — |
| value1_end | FLOAT | 5.00-1000000000–1000000000 | — |
| value1_step | FLOAT | 1.000.000001–1000000 | — |
| value2_start | FLOAT | 0.00-1000000000–1000000000 | — |
| value2_end | FLOAT | 3.00-1000000000–1000000000 | — |
| value2_step | FLOAT | 0.500.000001–1000000 | — |
| seed | INT | 00–18446744073709550000 | — |
| reset | BOOLEAN | false | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| value1 | FLOAT | — |
| value2 | FLOAT | — |
| current_index | INT | — |
| total_combinations | INT | — |
| current_combination | STRING | — |