Integer | Basic
A whole-number constant node with a 64-bit range
- INT
Every graph has constants scattered through it - a step count, a batch size, a seed offset, a tile size. ComfyUI lets you type these into node widgets, but a number that lives in five places deserves to live in one. IntegerInput ("Integer | Basic") is a single INT widget that outputs its value on a wire, so you can define a whole number once and feed it wherever it's needed.
The single input is value: an INT with a default of 0, a step of 1, and a range covering the full 64-bit signed span (±9.2 quintillion, the same 0xffffffffffffffff limit you see across this pack's INT nodes). The output is INT. There is genuinely nothing else to it.
Why you'd reach for it
Three scenarios make a standalone integer input worth it:
- The shared constant. Steps, batch sizes, or an aspect-ratio base that several nodes need - one widget, changed in one place.
- The exposed knob. You want a value visible at a glance rather than buried in a node's properties panel, so a collaborator (or future you) can find it.
- Feeding math. This pack's
BasicMath,IntMath, andNumberLerpaccept INT sockets happily, so anIntegerInputfeeding a couple of math nodes keeps everything integer-clean.
It's the sibling of FloatInput in the same Primitives category - same idea, whole numbers only.
Installing it
Standard pack install. The Basic Math pack is pure Python - no requirements.txt, no model downloads, nothing heavy:
cd ComfyUI/custom_nodes
git clone https://github.com/akatz-ai/ComfyUI-Basic-Math
Restart ComfyUI and it's under Basic Math ➕ → Primitives, listed as "Integer | Basic". Or use ComfyUI Manager → Install Custom Nodes → search "ComfyUI-Basic-Math".
The gotchas
Not much to trip on with a plain integer, but two notes. The step of 1 means dragging the widget snaps to whole numbers - that's intended; type decimals and it'll be refused, because the socket is strictly INT. And if you type a value beyond the 64-bit range, the widget will clamp it. Also expect the | Basic suffix in the menu name - it's this pack's collision-avoidance convention, not a different node. When you need a fractional value, grab FloatInput instead.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | INT | 0-18446744073709550000–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |