Random Float To String
Random decimals, rounded to two places, as text
- STRING
Random Float To String rolls a random decimal in a range you define and hands it back as a STRING, rounded to two decimal places. 0.31742... comes out as 0.32. It's the float-flavored sibling of the pack's Random Int To String, and like that node its whole personality is the "as a string" part - you're getting text, not a number you can plug into a sampler's numeric input.
So what do you actually do with a random decimal delivered as text? The realistic uses are cosmetic or textual. Append it to a filename or a label so each save gets a unique-but-legible tag. Drop it into a prompt as a literal value - some workflows like to inject random numeric descriptors (a zoom level, a percentage, a strength value spelled out) and this gives you a clean, comma-safe number to slot in. If you instead need the float to drive an actual parameter like CFG or denoise, ComfyUI's core RandomNumber node returns a raw value you can wire into numeric inputs - this node is for when the number has to appear somewhere as text.
The three inputs
- min - floor of the range, default 0.0, can go negative down to -100.
- max - ceiling, default 1.0.
- seed - and here's the good news relative to its sibling: this one actually works. The float node seeds its NumPy generator from the
seedinput, so same seed → same float, reproducibly. If you want a deterministic random number as text, this is the node to use.
One output, STRING, formatted to two decimals ({:.2f} - so don't expect more precision than that; 0.005 rounds to 0.01, and a range of 0.0 to 1.0 gives you one of only 101 possible values). If two-decimal granularity is too coarse for what you're doing, that's the real limitation to know about.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/Kaleidia/KaleidiaNodes
# restart ComfyUI
Or via ComfyUI Manager, searching "KaleidiaNodes". No dependencies, no models, nothing to download. It's a small utility - the one in the pack's string trio you can actually trust to respect its seed, and that's the honest reason to pick it over its int counterpart when you have a choice.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| min | FLOAT | 0.0 | — |
| max | FLOAT | 1.0 | — |
| seed | INT | 6691882220–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |