Nodes/JPS Custom Nodes for ComfyUI/Multiply Int Float (JPS)
ComfyUI Node

Multiply Int Float (JPS)

The node for fractional scale factors JPS's own Resolution Multiply can't do

By JPS-GER·Created 3 years ago·Updated 2 years ago· 101
Multiply Int Float (JPS)
    • int_multiply
    • float_multiply
    int_a1
    float_b1.00

    ComfyUI is strict about types in a way that trips up beginners constantly: an integer width and a float scale factor can't just be multiplied together by dragging a wire between them, you need an actual math node in between, and then usually another node to convert the result back to whichever type the next widget expects. This node collapses that whole dance into one box.

    It takes exactly two inputs - int_a and float_b, both defaulting to 1 - multiplies them, and gives you the answer twice: once as int_multiply (an integer) and once as float_multiply (a float, full precision). That's the entire mechanism, but the "give you both types" part is the actual feature. Most multiply nodes force you to pick one output type and then bolt on a converter node if the next thing in your graph wants the other kind. This one just hands you both, so you wire whichever output matches what's downstream and skip the extra node.

    Where this earns its keep. The clearest example: JPS's own Resolution Multiply node only accepts a whole-number factor (1 through 8) - by design, not by accident - which means it can't do a 1.5x upscale, a genuinely common target because it's gentler on VRAM than a straight 2x. Multiply Int Float is the node that actually handles that case: feed it your base width (or height) as int_a and 1.5 as float_b, and take int_multiply straight into your latent upscale or Empty Latent Image node. More generally, it's useful anywhere you're combining a pixel dimension (always an int in ComfyUI) with a ratio, strength, or scale value (almost always a float) - resolution math, denoise-scaled step counts, that kind of thing.

    Installing it. Through ComfyUI Manager (search "JPS Custom Nodes for ComfyUI"), or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/JPS-GER/ComfyUI_JPS-Nodes.git
    

    Restart ComfyUI and it's under JPS Nodes/Math. If you have an older copy of the pack installed, remove it first - the author warns explicitly that duplicate installs collide on class names. Nothing to download beyond the repo itself; it's arithmetic, no dependencies.

    Troubleshooting. There's genuinely very little to go wrong with a two-input multiply node. The one thing worth knowing: int_multiply is the integer result, so if your float factor produces a non-whole number (1024 × 1.5 = 1536, which is clean, but 1000 × 1.33 isn't), that output gets rounded or truncated rather than erroring out. If you need the exact fractional value for further math before converting to a pixel dimension, chain off float_multiply instead and only round down to int_multiply-equivalent behavior at the very last step before it hits a width/height widget.

    CategoryJPS Nodes/Math

    Inputs (2)

    NameTypeDefaultDescription
    int_aINT1
    float_bFLOAT1.00

    Outputs (2)

    NameTypeDescription
    int_multiplyINT
    float_multiplyFLOAT