Int → Number
When your integer needs to flow into a looser type
- NUMBER
ComfyUI treats numbers like a fussy landlord. An INT wire into a FLOAT input is fine - widening a whole number to a float costs nothing. But the reverse direction, FLOAT into INT, is blocked, and that asymmetry is why a whole class of "conversion" nodes exists. SL_IntToNumber works the friendly direction: it takes your integer and turns it into a NUMBER, the generic numeric type that INT and FLOAT outputs can both feed.
Mechanically it's return (float(value),), so 5 becomes 5.0 under the hood. The value doesn't change in any meaningful way - you're not truncating or rounding, just widening the type label so it can plug into any input that accepts NUMBER. This matters when a downstream node - often one from WAS Node Suite, KJNodes, Impact Pack, or another utility pack - declares its input as NUMBER and you want the connection to be a sure thing rather than a hopeful auto-coercion.
The practical uses:
- Normalizing a branch. If you have a chain where some sources are INT (a seed node, a batch counter) and others are FLOAT (a computed strength), converting the INTs to NUMBER at the source lets them all merge into one consistent numeric stream.
- Feeding NUMBER-typed inputs. Some custom nodes type their ports NUMBER specifically because they expect either kind of numeric input. This node is your explicit "I mean this as a number" signal.
- Preparing for math. If your next node does arithmetic and you want every operand float-backed to avoid integer-division surprises, converting the ints first removes a whole class of silent weirdness.
Inputs and outputs:
value(INT) - the integer, default 0.- Output:
NUMBER- float-backed, generic label.
Installing it
This is one of ~35 nodes in ComfyUI-SimpleLogics. Easiest: ComfyUI Manager → Install Custom Nodes → search "SimpleLogics" → install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/danipisca07/ComfyUI-SimpleLogics
Restart ComfyUI, then Add Node → search "Int → Number" (it sits under SimpleLogics/Convert). The pack has no dependencies - no requirements.txt, no models, pure Python - so nothing else to fetch.
Gotchas
- It's a passthrough, not a fixer. If you were hoping this would fix a FLOAT-into-INT mismatch on the other side of your graph, you want the reverse node (
SL_NumberToIntorSL_FloatToInt) - those truncate and give you a real integer. - The output is float-backed. When a NUMBER flows onward, most downstream nodes treat it as a float. If the final destination truly needs a whole number, convert to INT at the very end, not here.
- Default of 0 - an unwired
valuesilently gives you 0.0. Label your wires.
It's a quiet utility node. You might not need it every day, but when a red wire is staring at you because a NUMBER-typed port is involved, it's the clean fix.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| NUMBER | NUMBER | — |