Integer Multiplication
Multiply two ints, get INT and STRING out
- Result (INT)
- Result (STRING)
Multiply one integer by another. That's the node. It exists because ComfyUI's graph has no built-in "do a bit of math on this number" primitive, and every so often you need one - computing a dimension, scaling a batch count, deriving a value that has to stay in step with another. This is the multiply in that small arithmetic toolkit.
The pack ships a little family of these (add, subtract, multiply, divide) precisely because wiring numbers around a workflow sometimes needs a computed value rather than a typed constant. If you find yourself typing "well the width is 512 so twice that is 1024" into a field by hand, this is the node that does it for you and keeps it correct when you later change the 512.
How it works
It takes int_value and multiply_value, multiplies them, and gives you the result twice - once as an INT for feeding math-hungry inputs, and once as a STRING for display or for nodes that want text. The dual output is the useful part: you get a number to wire onward and a text version to drop on a ShowText node so you can see what it computed.
The inputs that matter
- int_value - the number to multiply. Note the default is 0, so if you leave it unconnected and untouched, the result is 0 - wire it from an upstream value or set it.
- multiply_value - the multiplier (default 2).
Outputs: Result (INT) and Result (STRING) - the same product in both types.
Where it fits
Anywhere a value should be derived rather than hard-coded. Scale a base width to a target, double a batch, compute an offset. The INT output goes to the next numeric input; the STRING output is handy on a ShowText node to sanity-check the math while you build. It's a leaf utility - small, boring, and exactly right when you need it.
Install
ComfyUI Manager → search ComfyUI_Mira → Install → restart, or cd ComfyUI/custom_nodes && git clone https://github.com/mirabarukaso/ComfyUI_Mira.git and restart. On a load error, pip install -r requirements.txt in the pack folder. No downloads.
Common issues
The one that catches people: int_value defaults to 0, and zero times anything is zero. If your result is stubbornly 0, that input is unset - connect it or type a value. Also remember this is integer math, so the output has no fractional part; if you need decimals, use the pack's Float Multiplication node instead. And if you're feeding the result into a latent or image dimension, keep in mind those inputs usually want a multiple of 8 - this node won't round for you, so a multiplier that lands on an awkward number can trip up a downstream node. Beyond that, it's a multiply - there's nothing else to it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| int_value | INT | 0 | — |
| multiply_value | INT | 2 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| Result (INT) | INT | — |
| Result (STRING) | STRING | — |