add
Adding integers in ComfyUI without reaching for a math node
- INT
Every so often a workflow just needs 2 + 2, but with live values - batch size plus a buffer, step count plus a margin, width plus an offset. That's this node: add from the Basic data handling pack, the integer addition operator with a wrapper, doing one thing and doing it exactly the way you'd expect.
What it does
Takes two integers and returns their sum. That's it. Under the hood it's int1 + int2, no rounding, no truncation, no surprises. 0 + 0 gives 0, and the defaults on both inputs are exactly that, so you can double-click it, see the result, and wire it up from there.
The reason you'd take this over a generic math node is the type contract: it's strict INT in, INT out. Feed it an int, get back an int - no float that then needs rounding or casting somewhere downstream. In a graph full of other Basic data handling nodes that respect INT, this keeps everything clean.
Inputs and outputs
int1- INT, default0.int2- INT, default0.- Output
INT- the sum of the two inputs.
Both inputs are wired as INT sockets, so you can plug another of the pack's integer nodes straight in - an IntSubtract feeding an IntAdd, or a create INT result as an operand.
Install
Part of the Basic data handling pack. Easiest via ComfyUI Manager: search "Basic data handling", install, restart. Manual install is the standard clone:
cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
then restart ComfyUI. No dependencies, no model files, no pip install - it's pure Python arithmetic.
The honest take
This is a boring node, and that's the compliment. You won't need it if you're happy with a full math node, but when you want an explicitly integer-typed + that never sneaks a float into your pipeline, it's the reliable choice. The only real "gotcha" is remembering it's int-only - if a float wanders in on a wire, wire it through a cast to INT node first, or use the pack's float add and let the type carry you.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| int1 | INT | 0 | — |
| int2 | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |