Multiply Int Int (JPS)
The one-node fix for ComfyUI having no multiply node
- int_multiply
- float_multiply
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 default1) - 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.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| int_a | INT | 1 | — |
| int_b | INT | 1 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| int_multiply | INT | — |
| float_multiply | FLOAT | — |