Float Multiplication
Multiply decimals, output float, int, and string
- Result (FLOAT)
- Result (INT)
- Result (STRING)
Multiply two decimal numbers. It's the floating-point member of the pack's little arithmetic family, for the cases where integer math won't cut it - scaling a denoise value, deriving a strength, computing a multiplier that has a fractional part. The handy bit is that it hands the answer back in three forms at once, so whatever the downstream node expects, you've got it.
You reach for this whenever a value needs to be computed from another value with decimals involved. Multiply a base scale by 1.5, halve a strength, work out a fractional ratio - anywhere you'd otherwise type a decimal by hand and have to redo the arithmetic every time an input changes.
How it works
It multiplies float_value by multiply_value and outputs the product three ways: as a FLOAT (the exact decimal result), as an INT (the result with the fractional part discarded - truncated, not rounded), and as a STRING (for display or text inputs). The three-type output means you don't need a separate convert node; grab whichever type the next socket wants.
The inputs that matter
- float_value - the number to multiply. Heads up: the default is 0, so an untouched, unconnected node outputs 0. Wire it or set it.
- multiply_value - the multiplier (default 1.5).
Outputs: Result (FLOAT), Result (INT), and Result (STRING) - the same product, three types. Remember the INT output truncates: 2.9 becomes 2, not 3. If that matters, use the float and round elsewhere.
Where it fits
Anywhere a fractional value should be derived rather than hard-coded - think strengths, denoise levels, ratios, or feeding a computed multiplier into another node. The FLOAT output is your main line; the INT output is convenient when the destination wants a whole number and truncation is acceptable; the STRING output drops onto a ShowText node so you can verify the math as you build.
Install
ComfyUI Manager → search ComfyUI_Mira → Install → restart, or cd ComfyUI/custom_nodes && git clone https://github.com/mirabarukaso/ComfyUI_Mira.git and restart. If the pack errors on load, run pip install -r requirements.txt in the pack folder. No downloads.
Common issues
The default-0 trap gets everyone once: float_value starts at 0, so if your result is 0, that input is unset - connect it or type a number. The second gotcha is the INT output's truncation - it drops the decimal rather than rounding, so 1.99 reads as 1; use the FLOAT output when precision matters and only take the INT when you genuinely want the floor. One more thing worth a glance: because floats carry tiny rounding error, a result you expect to be exactly 2.0 might read as 1.9999999, which matters if some downstream node does an exact comparison - round it there if it bites. Otherwise it's a multiply, and it behaves.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| float_value | FLOAT | 0 | — |
| multiply_value | FLOAT | 2 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| Result (FLOAT) | FLOAT | — |
| Result (INT) | INT | — |
| Result (STRING) | STRING | — |