Nodes/ComfyUI-TinyBee/Int to Float
ComfyUI Node

Int to Float

The one-line node that unblocks half your workflows

By TinyBeeman·Created about a year ago·Updated about a month ago· 1
Int to Float
    • float
    integer0

    There's nothing clever about Int to Float, and that's exactly why you'll reach for it. ComfyUI is strict about types: a node that wants a FLOAT input - denoise strength, CFG, conditioning strength - will refuse a wire from an INT output, and if the only number you have is an integer, you're stuck. This node converts one to the other in a single step.

    It exists because the numbers in a workflow don't always arrive as the type you need. Say a seed-driven node or a counter produces an integer, and you want to use it to scale a strength value. Or you're building automation where a steps value (integer, obviously) needs to feed something expecting a float. Without a cast node, you'd either fight the type checker or rebuild the number by hand. With this, it's one wire.

    How it works

    Mechanically it's the least mysterious thing in the pack: it takes the integer input and returns Python's float() of it. No rounding, no clamping, no lossy conversion - 42 becomes 42.0. The value is identical, just wearing the type the rest of your graph expects.

    The two fields that matter:

    • integer (INT) - whatever whole number you're converting. Default 0, and it accepts a wired input.
    • float (FLOAT) - the same value as a floating-point number, ready to plug into denoise, CFG, or any strength/weight input.

    That's the whole interface: one in, one out. It's a converter, not a calculator.

    Installing it

    This is one node in ComfyUI-TinyBee, a small MIT-licensed utility pack from TinyBeeman. No models, no heavy deps - the kind of pack you install once and forget. Via ComfyUI Manager:

    1. Manager → Custom Nodes Manager.
    2. Search "ComfyUI-TinyBee" and install.
    3. Restart ComfyUI.

    Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/TinyBeeman/ComfyUI-TinyBee
    

    Restart, and it lives under 🐝TinyBee/Casting. The pack's requirements.txt mentions jsonata, but that's only for its JSON Parser node; Int to Float needs nothing beyond what ComfyUI already has.

    Gotchas

    Honestly, the only "gotcha" is knowing it exists. If the number you have is a string rather than an integer, grab the pack's String to Float instead - that one parses text. And if you're going the other direction (float to int), there's a mirror Float to Int node that truncates the decimal rather than rounding, so be aware of the difference when you use it. For everything else: wire the integer in, take the float out, move on with your life.

    Category🐝TinyBee/Casting

    Inputs (1)

    NameTypeDefaultDescription
    integerINT0-2147483648–2147483647

    Outputs (1)

    NameTypeDescription
    floatFLOAT