♻ Loop (Float)
Loop Float (Bjornulf_custom_nodes) — ComfyUI Node Guide
- FLOAT
Whenever you want to see how a single float parameter affects your output across a range - CFG, denoise strength, an IPAdapter weight, anything that's a slider rather than a dropdown - this node builds the range for you and lets ComfyUI's list execution run through it automatically. Set a start, an end, and a step, and every value in between gets its own full generation.
How it works
from_this, to_that, and jump define a numeric range, and the node builds a list of float values across it - from_this, from_this + jump, from_this + 2*jump, and so on up to to_that. That list becomes the output, and because it's a list rather than a single value, ComfyUI re-runs everything downstream once per value automatically. It's the same underlying "loop by outputting a list" trick every loop node in this pack uses - this one's just scoped to floating-point ranges specifically.
Inputs and outputs
from_this (FLOAT, default 0, range 0–1000, step 0.01), to_that (FLOAT, default 10, same range), and jump (FLOAT, default 1, same range and step) define the sweep. One output: a FLOAT list. Right-click the widget you're feeding this into (a KSampler's cfg or denoise, for instance) and use "Convert widget to input" so you have a socket to actually plug this node's output into - ComfyUI parameter widgets don't accept connections by default.
Installing it
Comes with the rest of Bjornulf_custom_nodes. ComfyUI Manager → search "Bjornulf_custom_nodes" → install → restart, or cd ComfyUI/custom_nodes && git clone https://github.com/justUmen/Bjornulf_custom_nodes and restart manually. No dependency specific to this node.
Common issues & troubleshooting
Floating-point ranges are more prone to off-by-one-step surprises than integer ones - small step values can accumulate rounding error over many iterations. The pack's own changelog notes a fix specifically for floating-point precision issues in this node's early versions, so if you're on an old install and seeing an oddly-placed extra value at the end of your range (or one that's slightly off from what you'd expect), updating the pack is worth trying before you assume your math is wrong.
Like every list-loop node in this pack, a wide range with a small jump can queue a lot of full generations from one click - sweeping CFG from 1 to 15 in steps of 0.1 is 140 complete runs, not 140 quick previews. Budget accordingly, and consider a coarser step for your first pass, then narrow the range once you've spotted the interesting region.
If you're sweeping something like denoise where the visual difference between adjacent steps matters, pair this node with Bjornulf's Text with Random Seed node if you specifically want a different seed per iteration too - on its own, a loop keeps the same seed across every value in the sweep, which is usually what you want for a fair comparison, but worth knowing it's the default rather than assuming it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| from_this | FLOAT | 0.000–1000 | — |
| to_that | FLOAT | 10.000–1000 | — |
| jump | FLOAT | 1.000–1000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | — |