create FLOAT
Type a number as text, get a float out — the string-to-number escape hatch
- value
- FLOAT
Normally you get a FLOAT in ComfyUI by typing into a number widget or wiring a FLOAT out of another node. But sometimes the number you want is sitting in a string - scraped out of a filename, parsed from a prompt, pulled from a config - and you need it as an actual float before anything will accept it. create FLOAT (Basic data handling: FloatCreate) is the conversion for exactly that.
One required input, value - which is technically ANY but is rendered as a string widget (that's the widgetType: STRING in the schema, and the default "0.0" gives it away). One output: the resulting FLOAT.
Mechanically it's dead simple and worth being honest about: float(value). The string gets parsed with Python's float parser, so "3.5" becomes 3.5, "-1e3" becomes -1000.0, "0.25" becomes 0.25. And that's the whole job - "no further processing," as the description says.
Why this exists and when it's the right tool
The honest answer is that plain FLOAT widgets already let you type numbers, so this node's real niche is programmatic input. A few places it genuinely earns its keep:
- You're generating numbers as text - a prompt template, a formula output - and need to feed them into numeric inputs elsewhere in the graph.
- You want a value that has to survive round-tripping through a STRING (e.g., writing a number to a file with this pack's save-STRING node, then reading it back later).
FloatCreateis the read-back half of that loop. - You're wiring a workflow where the number comes from another node's ANY output and you want an explicit conversion rather than hoping an implicit one happens.
What'll bite you
float() is unforgiving. Feed it "3,5" (comma decimal), "three", or a number with a stray space like " 3.5" and it throws a ValueError - your node goes red and the queue stops. If your strings might have junk in them, sanitize upstream (strip, replace, or this pack's string nodes) before you hit this node. The one thing float() does accept that surprises people is scientific notation - "1e-6" works fine, which is handy for tiny denoise values.
Installing it
This node ships in the Basic data handling pack by StableLlama. In ComfyUI Manager, search "Basic data handling", install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
then restart. Zero dependencies, no requirements.txt, no model downloads.
Troubleshooting
If your conversion fails, it's almost always dirty input - check for commas, spaces, or letters. And a friendly reminder that this produces a FLOAT: if the number is a whole "5", you'll get 5.0, not the INT 5. If downstream needs an integer, pair this with a cast-to-INT node from the same pack.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | * | 0.0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | — |