Integer to Float Multiplication
Scale an int into a float
- Result (FLOAT)
- Result (INT)
- Result (STRING)
This node multiplies an integer by a float and gives you the answer in three flavors at once: as a FLOAT, as an INT, and as a STRING. It's small arithmetic glue - the kind of node you drop in when one part of your graph produces a whole number and another part needs it scaled and in a different type.
The everyday use, and the one the author calls out, is turning a big integer like a seed into a usable fraction: multiply a seed by 0.1 (or similar) and feed the result somewhere that expects a float, or into an even/odd check or a text switcher to drive some downstream variety. It's part of ComfyUI_Mira, mirabarukaso's collection of workflow utilities, in the pack's Arithmetic family (which the author openly labels "WIP as I need") - meaning these math nodes exist because a real workflow needed them, not as a tidy general calculator.
How it works
Multiply int_value by multiply_value. You get the exact product as a FLOAT, the same product truncated to an INT (the fractional part is discarded, not rounded - so 3 x 1.5 = 4.5 becomes 4 on the INT output), and the product rendered as a STRING for display or concatenation. Three outputs, one multiplication.
The inputs and outputs that matter
- int_value - the integer to scale (min 0).
- multiply_value - the float to multiply by (default 1.5, very fine step so you can dial in precise ratios).
- Result (FLOAT) - the exact product.
- Result (INT) - the product with the decimal part chopped off.
- Result (STRING) - the product as text.
Grab whichever output matches what the next node wants - that's the whole point of emitting all three.
Installing it
ComfyUI Manager: search ComfyUI_Mira, install, restart. Or clone:
cd ComfyUI/custom_nodes && git clone https://github.com/mirabarukaso/ComfyUI_Mira.git
then restart. If it errors on load, run pip install -r requirements.txt in the ComfyUI_Mira folder. It's under Mira/Arithmetic.
Common issues
- The INT output truncates, it doesn't round. 4.5 comes out as 4, 4.9 also comes out as 4. If you need proper rounding, don't rely on the INT output - take the FLOAT and round it downstream.
- Grab the right type. Feeding the FLOAT output into an INT-only socket (or vice versa) won't connect. That's exactly why the node gives you all three - pick the one that matches.
- It's deliberately minimal. This is one operation from a "WIP as I need" arithmetic set. If you need a full expression or chained math, you'll be stringing several small nodes together - that's the design, for better or worse.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| int_value | INT | 0 | — |
| multiply_value | FLOAT | 2 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| Result (FLOAT) | FLOAT | — |
| Result (INT) | INT | — |
| Result (STRING) | STRING | — |