ComfyUI Node

multiply

Scaling values in your graph without a calculator trip

By StableLlama·Created about a year ago·Updated 4 days ago· 48
multiply
    • FLOAT
    float11.00
    float21.00

    multiply (Basic data handling: FloatMultiply) is float1 × float2, two floats in, one FLOAT out. That's the entire spec, and honestly it's the most-used kind of node in this pack, because "scale this value" is the most common thing you'll want to do to a number in a workflow.

    The use cases write themselves. Take a computed denoise and scale it by a strength factor. Turn a 0–1 weight into a percentage by multiplying by 100. Halve a CFG by multiplying by 0.5. Every one of those is FloatMultiply with one input wired from another node and the other left as a constant widget. That's the killer pattern here: the multiplier becomes a knob you can drag while the other input stays live.

    Keep it to one operation

    Like its siblings in the pack, this node is meant for a single operation. The moment you're stacking multiply nodes to compute (a × b) + (c × d) or similar, you've outgrown it - switch to this pack's MathFormula node and write the expression once. Two or three dedicated math nodes in a row is where graphs turn into spaghetti.

    A genuinely useful trick with multiplication: it's how you do a soft "if" without branching. Multiply a value by 0.0 and it becomes zero; by 1.0 and it passes through. Drive the multiplier from a boolean comparison and you've got a multiplicative gate - handy when you want a value to stay in the graph (feeding a downstream node) but be neutralized.

    Installing it

    Part of the Basic data handling pack by StableLlama. ComfyUI Manager → search "Basic data handling" → install → restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
    

    then restart. No dependencies, no requirements.txt, no model downloads.

    Troubleshooting

    Output is a FLOAT even when both inputs look like integers, so 2 × 2 yields 4.0 - cast if a downstream node wants INT. And remember the output of a multiply of two floats is only as precise as float math gets, so don't rely on an exact == comparison afterward. Multiply by a huge or tiny constant and you can also drift into inf/very-small-number territory, but that takes deliberate effort to hit.

    CategoryBasic/FLOAT

    Inputs (2)

    NameTypeDefaultDescription
    float1FLOAT1.00
    float2FLOAT1.00

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT