ComfyUI Node

VRGDG_IntToFloat

The Two-Second Type Fix That Unsticks Stubborn Nodes

By vrgamegirl19·Created about a year ago·Updated about 7 hours ago· 718
VRGDG_IntToFloat
    • value
    value0

    VRGDG_IntToFloat is the most boring node in this pack and one of the more useful ones to have around. It takes one integer and hands you the same number as a float. That's the whole trick, and you'll reach for it more than you expect.

    The reason it exists is ComfyUI's type system being pickier than it looks. Plenty of nodes expose float inputs - strengths, denoise values, scale factors - and they'll happily accept a hard-typed FLOAT from upstream. But the second you compute an integer somewhere (a counter, a frame number, a scene index) and try to feed it into something expecting a float, you get the red "input type mismatch" socket and the node refuses to connect. This node is the bridge: drop an integer in, get a float out, move on.

    Inputs and output

    There's exactly one of each, which is the point.

    • value (INT) - the integer you want converted. Default 0, steps by 1.
    • Output value (FLOAT) - the same number, now a float.

    Nothing is calculated, nothing is rounded, nothing gets lost. It's a type cast with a widget on it, no different in spirit from the Int to Float helpers bundled in other utility packs, just namespaced as VRGDG.

    Where you'd actually use it

    Inside this pack it mostly smooths over the seams of the music-video workflow - scene counts, chunk indices, and step numbers that need to land in a float slot on a sampler or a scheduler. Outside the pack it's the same fix anywhere: a KSampler's denoise, an upscale model's scale_by, any widget that wants 0.5 and won't take 0.

    It's also handy when you're debugging why two nodes won't connect and you can't tell if it's a type problem or a logic problem. Throwing this in the middle settles the question in two seconds.

    Install

    It ships in the VRGameDevGirl pack, so you get it with the whole bundle:

    cd ComfyUI/custom_nodes
    git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
    

    Restart ComfyUI and it appears in the VRGDG/General category. Or use ComfyUI Manager and search for vrgamedev - both install the same thing. The pack's requirements.txt pulls in kornia, librosa, and imageio, which this node doesn't need but the rest of the pack absolutely does, so let them install.

    Honest notes

    You do not need this node to exist. Any node pack's string-to-number helper or a small custom node does the same job, and ComfyUI's newer type-flexible nodes accept both ints and floats natively. But if you've already got this pack for the video side, it's zero extra weight and it lives in the menu where you're already looking. The only way to mess this up is to feed it a value you didn't mean to convert - and even then, you just deleted the node.

    CategoryVRGDG/General

    Inputs (1)

    NameTypeDefaultDescription
    valueINT0

    Outputs (1)

    NameTypeDescription
    valueFLOAT