Random Float
A seeded random number you can actually wire into a graph
- random_float
Random Float does one thing: pick a random floating-point number between two bounds, seeded so the pick is reproducible. Unremarkable on its own, but it fills a real gap - ComfyUI's native way of randomizing a value is the "control after generate" setting bolted onto a widget, and that only works on the widget it's attached to. It's not a node output, so you can't feed the same random draw into two different places, and you can't build a workflow where the random value itself is something you inspect, log, or branch on. Random Float is a real INT-in-FLOAT-out node, so all of that becomes possible.
Inputs. seed is the usual reproducibility knob - same seed, same draw, every time. min_value and max_value set the range you're sampling from (both default to 0 and 1, i.e. a plain 0–1 float out of the box). decimal_places (default 10) controls rounding on the output - ten decimal places is more precision than almost anyone needs for something like a denoise strength or a LoRA weight, so most people will want to drop this to 2–4 for a value that's actually readable in the UI. Output is a single random_float.
What you'd actually plug it into. Anywhere a FLOAT socket lives: denoise strength, CFG scale, a LoRA's strength_model/strength_clip, a custom node's threshold. The point of routing it through a real node instead of hand-picking values is that you can seed-sweep a parameter reproducibly across a batch - same idea as seed-sweeping the image itself, just applied to a different number. Pair it with its integer sibling, Random Int, when a single workflow needs both kinds of randomized parameter - a random step count from one and a random denoise strength from the other, both tied to the same or independent seeds depending on whether you want them to move together.
Installing it. No dependencies, pure arithmetic. Search "comfyui_gr85" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/veighnsche/comfyui_gr85
Restart ComfyUI.
Two things worth knowing before you rely on it. First, it's seeded - leaving seed static across runs will hand you the exact same float every single time, which trips people expecting "random" to mean "different on every queue." If you want it to actually vary run to run, wire it to your batch/KSampler seed or bump it manually. Second, nothing here validates that min_value is actually less than max_value - the schema doesn't document a swap or a clamp, so if you accidentally flip them, don't expect the node to correct you; just keep them in order yourself.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 0 | — |
| min_value | FLOAT | 0.0000-1e-10–10000000000 | — |
| max_value | FLOAT | 1.0000-1e-10–10000000000 | — |
| decimal_places | INT | 10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| random_float | FLOAT | — |