Substract Int Int (JPS)
Subtraction, and yes that's really the node's name
- int_substract
- float_substract
If you searched for "Subtract Int Int" and came up empty, that's why - the node's actual display name has the typo baked in, "Substract" rather than "Subtract." It's not a mistake on your end; it's literally what shows up in ComfyUI's node search, straight from the pack's source. Once you know that, the node itself is exactly as simple as it sounds: two integers in, A − B out.
How it works
Same shape as the Multiply family elsewhere in this pack: two required integer inputs, and the result handed back twice - once as an integer, once as a float - so whichever type your downstream socket wants, you've already got it without adding a conversion node. int_a minus int_b, in that order, going by the input naming.
This is the same category of small glue node as Multiply Int Int (JPS): for anywhere you need "one number minus another" - computing an offset, a padding delta, or the leftover space after cropping something - without pulling in a general expression evaluator for a single subtraction.
The inputs and outputs that matter
int_a,int_b(INT, required, both default1) - the operands,int_a − int_b.int_substract(INT) - the difference, as an integer.float_substract(FLOAT) - the same difference as a float.
How to install it
ComfyUI Manager: search "JPS Custom Nodes for ComfyUI." Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/JPS-GER/ComfyUI_JPS-Nodes.git
Restart. No models, no meaningful dependencies - same as every other node in this pack.
Common issues & troubleshooting
Negative results. Nothing here clamps at zero - if int_b is bigger than int_a, you get a negative number, and that's correct behavior, not a bug. If your downstream logic assumes only positive deltas, add your own clamping (a max(0, x)-style node, or a conditional) rather than expecting this node to protect you from it.
Defaults hiding a disconnected input. Both int_a and int_b default to 1, so int_a − int_b defaults to 0. If a downstream value is unexpectedly zero, check that both inputs are actually wired before assuming the node is broken - an unconnected input won't error, it'll just run on the default.
Can't find it by searching "Subtract." Search "Substract" instead - the misspelling is in the class name itself, not something introduced by this article. Same pattern applies across this pack's naming in general; if a node doesn't show up where you expect, try the literal display name rather than the "correct" spelling.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| int_a | INT | 1 | — |
| int_b | INT | 1 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| int_substract | INT | — |
| float_substract | FLOAT | — |