Float To String (Soze)
Turning a number into text you can actually use
- STRING
You've got a FLOAT value in your graph - a CFG scale, a computed strength, a ratio - and you need it as text: baked into a filename, concatenated into a prompt, written to a log file. FLOAT and STRING sockets don't connect directly in ComfyUI, so Float To String is the adapter that turns a number into something a text node will accept.
It sits in the same family as Float To Int and Int To String - the pack's small set of type converters that exist because ComfyUI's typed sockets don't let you skip them.
How it works
The node takes your float and renders it as a string, with a second field - format - to control how. The schema doesn't spell out the exact format syntax, but a format string field on a numeric-to-string converter almost always follows Python's format-spec conventions (things like .2f for two decimal places, .0f to drop the decimal entirely). Leave it blank and you'll get the plain str() representation of the float; if you need a specific number of decimals for a clean filename or label, that's the field to experiment with.
The inputs and outputs that matter
float- the value to convert. Default0, unbounded range,0.01step.format- optional formatting control, default empty string. Try a Python-style format spec (.2f,.1f) if you want fixed decimal places instead of whatever precision the raw float carries.- Output:
STRING- wire this into a text concatenation node, a filename builder, or anywhere else that wants text rather than a number.
How to install it
Through ComfyUI Manager - search "Quality of Life Nodes for ComfyUI" or "Soze" - or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/SozeInc/ComfyUI_Soze.git
pip install -r ComfyUI_Soze/requirements.txt
Restart after. Nothing heavy here - no models, no GPU dependency, and none of the pack's API-key-gated integrations (ComfyDeploy, FAL, ElevenLabs) come into play for a plain type converter.
Common issues & troubleshooting
Format string doesn't do what you expect. Since the exact syntax isn't documented anywhere in the node itself, the fastest way to find out what format accepts is to wire the output straight into a Show Text node and try a couple of values (.2f, %.2f) rather than guessing blind - one of them will work, and you'll know immediately from the output.
Floating-point noise in filenames. If you skip format and feed in a computed value (not a clean widget number), you can end up with something like 0.7000000000000001 in your string - the classic floating-point representation issue, not a bug in this node. Set a format spec to round it off cleanly.
No community troubleshooting to lean on. ComfyUI_Soze has almost no footprint in general ComfyUI discussion, so if format genuinely misbehaves, your fastest path is reading the pack's own source on GitHub rather than searching for a fix that likely doesn't exist yet.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| float | FLOAT | 0.00-100000000000000000000–100000000000000000000 | — |
| format | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |