floatToText _O
Get a number into your prompt string
- STRING
Numbers are useful. Strings are useful. Putting a number inside a string is the weird middle ground where ComfyUI makes you work for it - and floatToText _O is the one-trick node that does exactly that conversion. You feed it a FLOAT, you get a STRING back containing that number. Sounds trivial until you want a computed value to show up in a filename, a caption, or a prompt term and realize the type system won't let a FLOAT just sit in the middle of your text.
It lives in O/numbers of the Quality of Life Suit pack, next to floatToInt _O and the equation nodes. If you're building a workflow that computes values and then labels things - a seed that gets baked into a saved filename, an upscale factor that appears in a caption - this is the bridge from arithmetic to prose.
How it works
The implementation is str(float): whatever number comes in becomes its plain string representation. 1.5 → "1.5", 0.0 → "0.0". One line, no formatting options, no rounding, no locale tricks.
float(FLOAT) - the value to stringify. Default 0, widget range 0 to a huge max.
One output: STRING. That's the whole feature list.
Where it fits
The realistic use cases are all "computed number meets text" moments:
- Filenames. Wire
Equation1param _O's result through this node into asaveTextToFile _Ofilename and your log file is automatically dated or versioned by a computed value. - Prompt assembly. A random NSP term or a numeric parameter you want visible in the final prompt string - concat the stringified number into your text with the pack's
Concat Text _O. - Debugging. Run a float through this into
Debug Text _Oand read the exact value in the console.
Before you reach for it, check the actual target node - lots of nodes that accept text will also accept a FLOAT directly and render it for you. The conversion node earns its keep when you're concatenating, not just displaying.
Installing it
Part of the Quality of Life Suit pack (omar92/ComfyUI-QualityOfLifeSuit_Omar92). Install via ComfyUI Manager (search "Quality of Life Suit") or clone:
cd <ComfyUI>/custom_nodes
git clone https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92.git
Restart ComfyUI properly. No models, no dependencies. The pack creates a config.json on first run with autoUpdate: true, so it may pull new commits at startup - disable it there if you prefer a static folder.
Common issues
- "The string shows
0.0but I wanted0." That's Python'sstr()on a float - a whole number stays typed as a float. If you want0without the decimal, run it throughfloatToInt _Ofirst (accepting the truncation). - "I can't set the number from a wire." The
floatinput is a widget, but most of the pack's number nodes accept wire input too (defaultBehavior: input), so feed it fromEquation1param _Orather than typing. - "The number is wrong in my filename." Check upstream - this node converts faithfully, so the corruption is in the math, not the stringify.
It's a dumb little adapter, but "dumb and correct" is precisely what you want when the alternative is hand-typing numbers into text that's supposed to be computed.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| float | FLOAT | 0.000–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |