Number → Float
The type-cast nobody explains to beginners
- FLOAT
Number → Float does one boring but genuinely necessary thing: it takes a NUMBER and hands it back as a FLOAT. To a human these are the same thing, which is exactly why this node confuses beginners. To ComfyUI, they're different socket types, and when a node upstream hands you a NUMBER and a node downstream insists on FLOAT, you need a cast - this is the cast.
Why you'd reach for it
ComfyUI treats numeric types more strictly than you'd expect. NUMBER is the generic numeric type - under the hood it's a Python float - and some nodes produce it, while other nodes' inputs only accept FLOAT (or INT). When those two meet, the socket won't connect cleanly, or ComfyUI inserts its own automatic conversion that you don't control.
The cleanest example: you've got a math node or a value node outputting NUMBER, and you want to feed it into a KSampler's denoise, a CFG input, or an upscale factor - all of which want FLOAT. Drop a Number → Float in between and the wire connects exactly as expected. It's the "why won't this socket snap together" fix.
How it works
Python's float(value) - a straight numeric cast that preserves the value, nothing truncated. The author's description is simply "Converts a NUMBER to a float." It lives in the SimpleLogics/Convert category, one of a whole family of type converters this pack ships: Number → Int, Number → String, Bool → Number, and so on. If a workflow you downloaded references this node, it's usually sitting right where a type mismatch used to be.
The inputs that matter
One required input:
value- theNUMBERto convert (defaults to0)
One FLOAT output. That's the whole node - input, cast, output.
Installing it
Part of danipisca07/ComfyUI-SimpleLogics, the dependency-free pure-Python pack (no requirements.txt, no model files). Install from ComfyUI Manager (search "SimpleLogics") or:
cd ComfyUI/custom_nodes
git clone https://github.com/danipisca07/ComfyUI-SimpleLogics
Then restart ComfyUI.
Common issues
There's no real failure mode - the cast is lossless, so you can't misplace a decimal point here. The only confusion is why you need it, and that's a ComfyUI type-system thing, not a bug in this node. If you're converting from an INT instead of a NUMBER, the pack's separate Int → Float node is the matching tool. And as always with this pack: it also registers an unrelated GeoCalib camera node the README doesn't mention, so ignore that one. Keep it updated with git pull and it'll just sit there doing its one job.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | NUMBER | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | — |