Int to Float
The one-liner that unblocks float-only inputs
- float_value
There is nothing glamorous about this node, and that's exactly why you'll need it. ComfyUI has nodes that only accept FLOAT inputs - strength sliders, sigma values, scale factors - and plenty of your workflow values arrive as INTs (seed math, step counts, dimensions). When an INT won't plug into a FLOAT socket, Int to Float is the handshake. One input, one output, no options, no surprises.
It's part of DebugPadawan's ComfyUI Essentials, a small MIT-licensed utility pack that's full of these boring-but-necessary conversions. This is the "4" that turns into "4.0".
How it works
It calls Python's float() on the value. That's the whole mechanism: 42 becomes 42.0, 7 becomes 7.0. The type change is the entire point - the number is unchanged, but now it satisfies the FLOAT inputs that INT values couldn't reach.
Inputs and outputs
- value - the INT to convert (default 0).
- float_value - the same number as a FLOAT.
Wire float_value into any FLOAT-only input that was previously refusing to accept the connection. If the value came from a string like "42", convert the string to an int first (the pack's String to Int node does that); this node expects an actual INT, not text.
Install
Standard custom-node fare:
cd ComfyUI/custom_nodes
git clone https://github.com/DebugPadawan/DebugPadawans-ComfyUI-Essentials.git
Restart ComfyUI, or install via ComfyUI Manager by searching "DebugPadawan". requirements.txt lists numpy, torch, and opencv-python - numpy and torch already ship with ComfyUI and the shipped code never imports cv2, so no heavy downloads, no model files, no API keys.
A small tip
Because it has no knobs, you can almost forget this node exists - but keep it in your back pocket for the day a "why won't this wire connect" bug turns out to be a type mismatch. If your workflow is full of these little converters, it's usually a sign your upstream math is in the wrong type to begin with - but that's a refactor for another day. The node works exactly as advertised, which is more than you can say for a lot of utilities.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| float_value | FLOAT | — |