Nodes/ComfyUI Ino Nodes/Ino Math Float
ComfyUI Node

Ino Math Float

Arithmetic between two numbers without hunting for a calculator node

By nobandegani·Created about a year ago·Updated 2 months ago· 6
Ino Math Float
    • float
    • int
    float_a0.00
    float_b0.00
    operation

    Sooner or later every workflow needs a little math - scale a strength by 1.5, halve a denoise value, square something because reasons. Stock ComfyUI has no dedicated arithmetic node, which means people rig together converters or do the arithmetic in their heads and hardcode it. Ino Math Float is the honest solution: two float inputs, pick an operation, get the result - plus the integer-truncated version for free.

    It's part of ComfyUI Ino Nodes (nobandegani/ComfyUI-InoNodes), the 125+-node V3-schema pack, and sits in its tiny InoFloatHelper category alongside float-to-int and float-comparison nodes.

    How it works

    Three inputs:

    • float_a - first number.
    • float_b - second number.
    • operation - a dropdown with six choices: add, subtract, multiply, divide, modulo, power.

    The node computes the result and hands you it twice:

    • float - the exact float result.
    • int - the same value truncated to an integer (Python's int() rounding, so it floors toward zero).

    That int output is the sleeper feature. Feed it power with a small exponent and you get a handy integer, or just grab it when your downstream node wants an INT and you'd otherwise need a separate float-to-int node. One compute, two typed outputs - that's the kind of frugality that keeps a graph small.

    The gotchas

    Two edge cases, both handled defensively rather than crashing:

    • Divide by zero returns 0.0, and modulo by zero returns 0.0 too. If your divisor can legitimately be zero, the node won't explode - but it also won't tell you it silently gave you zero, so check your math assumptions before relying on the result.
    • int output truncates. If you need rounding (up or to nearest), pair this with the pack's Ino Float To Int which offers round/floor/ceil instead of the truncation you get here.

    When you'd use it

    The bread-and-butter case is scaling: take a strength or CFG value, multiply it by a factor from a constant or another node, and feed the scaled number downstream. It's also handy for building dynamic sampler parameters - halve a step count, compute a denoise multiplier - where hardcoding numbers makes the workflow brittle.

    Installing it

    ComfyUI Ino Nodes installs like any custom node pack:

    • ComfyUI Manager (easiest): search for "ComfyUI Ino Nodes", install, restart.
    • Manual:
      cd ComfyUI/custom_nodes
      git clone https://github.com/nobandegani/ComfyUI-InoNodes.git
      cd ComfyUI-InoNodes
      pip install -r requirements.txt
      Then restart ComfyUI.

    The pack needs inopyutils and a current ComfyUI. It's a niche pack with minimal community footprint, so the README is your manual - but for "multiply two numbers and get a usable result," Ino Math Float is exactly the node you were looking for.

    CategoryInoFloatHelper

    Inputs (3)

    NameTypeDefaultDescription
    float_aFLOAT0.00
    float_bFLOAT0.00
    operationCOMBO6 options: add, subtract, multiply, divide, modulo, power

    Outputs (2)

    NameTypeDescription
    floatFLOAT
    intINT