Integer Add
Add two whole numbers in the graph
- INT
Exactly what it says: it takes two integers, a and b, and outputs their sum. This is arithmetic as a node, for the times you need to compute a number inside the graph instead of typing a constant.
Why would you? Because in a real workflow, values move. You've got a frame index and you want "the next frame," so you add 1. You've got a base resolution and you want to add some padding. You've got a start index and a length and you want the stop index. Any time a number should be derived from another number rather than hardcoded, a math node like this is how you do it - and once one value is dynamic, hardcoding the rest just means editing them by hand every run.
How it works
a + b. That's it. Integer addition, integer out.
Inputs and outputs
- a and b - the two integers to add. Both default to 0 and cover the full integer range, so you won't run into a ceiling.
Output is a single INT, the sum.
Installing it
It's in the pack's comfyui_primitive_ops file. Install via ComfyUI Manager (search Various ComfyUI Nodes by Type / comfyui-various) or clone:
cd ComfyUI/custom_nodes
git clone https://github.com/jamesWalker55/comfyui-various
Restart ComfyUI. No models, no extra dependencies.
Common issues
Nothing about this node breaks - it adds two numbers. The only honest note is about scope. It does one operation, so anything beyond a single addition means chaining nodes: to subtract you'd use the pack's JWIntegerSub, to add three numbers you'd chain two adds, and so on. This pack deliberately keeps each math op as its own tiny node rather than giving you one calculator node with a dropdown. If you find yourself wiring up a long arithmetic chain, that's a sign you might want a single expression-evaluator node (some other packs offer one) instead of a dozen of these - but for a quick offset, this is the clean, obvious tool.
A worked example makes the point: you've loaded a batch of frames and you want to grab "the frame right after the current one." Take your current index, feed it into a, put 1 in b, and the output is your next index - which you can hand straight to an extract-from-batch node. Change the current index and the "next" one follows automatically, because it's computed rather than typed. That's the whole reason to reach for a math node instead of a hardcoded number.
Also keep both inputs as integers. If you feed a float in, you're in type-mismatch territory; convert it first with something like JWFloatToInteger so the types line up.
If the node loads red as missing in a downloaded workflow - and these JW math nodes turn up in shared graphs a lot - the pack simply isn't installed. Manager's "Install Missing Custom Nodes" or a clone of the repo above sorts it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| a | INT | 0-18446744073709550000–18446744073709550000 | — |
| b | INT | 0-18446744073709550000–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |