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

Multiply Int Int (JPS)

The one-node fix for ComfyUI having no multiply node

By JPS-GER·Created 3 years ago·Updated 2 years ago· 100
Multiply Int Int (JPS)
    • int_multiply
    • float_multiply
    int_a1
    int_b1

    ComfyUI's core node set has no plain multiply node, which is a little absurd given how often you need one - computing an upscale target from a base resolution, working out total pixel counts, deriving a batch size. Multiply Int Int (JPS) fills that specific gap: two integers in, their product out, no expression syntax to learn.

    It belongs to the same small family as Multiply Float Float and Multiply Int Float in this pack - pick whichever variant matches the types you're actually multiplying, rather than converting everything to one type first.

    How it works

    Take two integers, multiply them, and hand the result back twice: as an INT and as a FLOAT. That dual output is the actual reason to use this over doing arithmetic in your head and typing a literal into a widget - ComfyUI's sockets are strictly typed, and rather than making you chase down a separate "convert" node whenever a downstream widget wants a float instead of an int, JPS just computes both up front.

    A common pairing: JPS's own SDXL Basic Settings node exposes a res_factor value (an integer 1–8, meant for scaling a base resolution up for upscaling passes). Feed that and your base width or height into Multiply Int Int, and you've got the target dimension without a calculator.

    The inputs and outputs that matter

    • int_a, int_b (INT, required, both default 1) - the two numbers to multiply.
    • int_multiply (INT) - the product.
    • float_multiply (FLOAT) - the same product as a float, for anywhere downstream that wants one.

    How to install it

    ComfyUI Manager: search "JPS Custom Nodes for ComfyUI." Manual install:

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

    Restart. No models, no meaningful Python dependencies - this whole pack is logic and image-prep nodes, so the install is as close to zero-friction as custom nodes get.

    Common issues & troubleshooting

    Numbers overflow expectations, not the node. There's no built-in cap here beyond the widget's own min/max range (this node's defaults are 1), so multiplying two large numbers together (say, computing a resolution × a large upscale factor) will just give you the literal product - sanity-check the result against your target resolution's multiple-of-8 requirement before wiring it straight into EmptyLatentImage. SDXL specifically expects dimensions from its trained aspect-ratio buckets (1024×1024, 1216×832, and their rotations, among others); a multiplied-out value that lands off those buckets will still run, it'll just generate worse anatomy.

    Defaults masking a disconnected input. Both int_a and int_b default to 1. If you forgot to wire one of them, the node won't error - it'll just quietly multiply by 1 and pass the other value through unchanged. If a downstream number looks like it "didn't get multiplied," check both inputs are actually connected before assuming the node is broken.

    Wrong node for the job. If either of your two numbers has a decimal, this isn't the node - reach for Multiply Int Float or Multiply Float Float instead, since int_a/int_b here are strictly integer widgets.

    CategoryJPS Nodes/Math

    Inputs (2)

    NameTypeDefaultDescription
    int_aINT1
    int_bINT1

    Outputs (2)

    NameTypeDescription
    int_multiplyINT
    float_multiplyFLOAT