Float (No Dec)
A whole number in a socket that only accepts floats
- FLOAT
Some inputs are floats for no good reason - a count, a size, a multiplier that only ever makes sense as a whole number - and if you wire an INT source into them ComfyUI will refuse the connection. This is the gap-filler.
What it's for
ComfyUI's type system is strict at the socket level. An INT output can't connect to a FLOAT input; the link simply won't stick, and people conclude the target node is broken. Meanwhile plenty of custom nodes declare float inputs where the meaningful values are 4, 8, 16 - tile counts, block sizes, chunk lengths, a scale that's only ever ×1 or ×2.
Float (No Dec) is a float socket whose value is a whole number. Two reasons to want it over a plain primitive float:
The widget snaps. Step 1.0 and a round of 1.0 in the widget config mean dragging moves in whole numbers, and the frontend suppresses decimal places - so you're not looking at 8.000000000000002 while deciding whether to tile four ways or six.
The value is actually cleaned in Python. Unlike the 1-dec and 2-dec variants in this pack, this one really does the work: the class returns float(int(round(float_val))). A stray 7.6 gets rounded to 8 before it leaves the node. That's the only node in the float trio that enforces its own precision, and it's why the tooltip says "float with no decimal places" and means it literally.
Where you'd reach for it: any float input you intend to feed a whole number into and want to read cleanly in a filename or in metadata. Which brings up the practical one - SaveImage's filename_prefix supports %NodeName.widget% tokens, and a float that prints as 2 instead of 2.0 is a small mercy when you're sorting a folder of results later.
How it works
One input, float_val: FLOAT, default 0, step 1, bounds ±10^15. One output, FLOAT. Right-click any target widget → Convert widget to input, then wire this in.
Range is deliberately enormous - you're not going to hit it with a tile count.
Installing it
ComfyUI-MDSNodes by MarwanDSAI. Manager: search ComfyUI-MDSNodes or MDSNodes, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/MarwanDSAI/comfyui-mdsnodes
# restart ComfyUI
No pip step, no downloads. The repo's requirements.txt is empty and the README says the pack needs nothing beyond ComfyUI's own dependencies - this node is genuinely one cast.
Search Float (No Dec); the pack files it under MDSNodes/Constants.
Common issues
It's not there. The whole constant family shipped in version 1.8.0. Update the pack in Manager, then restart the server - the node list is built at startup.
You picked the wrong sibling. Three of them look identical in the search results and they behave differently: this one rounds, Float (1 Dec) and Float (2 Dec) only change the widget's step. If you need 0.35 to actually be 0.35 and not 0.3499 downstream, Float (2 Dec) won't save you - but nothing is rounding there either, so it usually doesn't matter.
The int you wanted to pass got truncated weirdly. round-then-int means 7.5 becomes 8 and 7.4 becomes 7. Banker's rounding applies at exact .5 boundaries, so don't use this to do arithmetic you care about - its job is a clean whole number in a float socket.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| float_val | FLOAT | 0-1000000000000000–1000000000000000 | Float with no decimal places. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | — |