CALC OP BINARY (JOV) π
Do math on anything β numbers, vectors, even images
- π °οΈ
- π ±οΈ
- β
CALC OP BINARY (JOV) π is a two-input math node that refuses to care what you feed it. Add, subtract, multiply, divide, modulo, power, dot product, cross product, bitwise AND/OR/XOR - 22 operations - all of which work on plain numbers, on vectors, and (in the 2.x line) on tensors too. It's the "b" side of Jovimetrix's CALC family: OP UNARY handles single-value operations, this one handles pairs.
If you've ever felt that ComfyUI's math situation is thin - a handful of dedicated float/int nodes scattered across different packs - this is the consolidation play. One node, both inputs type-agnostic, output type follows input.
What it does
Feed A and B, pick an operation:
- π °οΈ and π ±οΈ - the two inputs. Both accept any type: floats, ints, vectors, and in current builds tensors. If an input is empty the node fills from defaults, so you can do things like "multiply every value in this vector by 2" by leaving B alone and using the default.
- βοΈ - the operation (default ADD). Beyond the arithmetic basics you get MAXIMUM/MINIMUM, the vector-specific DOT_PRODUCT and CROSS_PRODUCT, and the bitwise family BIT_AND, BIT_OR, BIT_XOR and friends - so this doubles as your bitwise-logic node when you're building procedural conditions.
- π - swap A and B before operating, for when you realize the order is wrong and don't want to re-plumb.
The output (β) is a list of results, with the type matching what the inputs were. Add two floats and you get a float; dot a pair of VEC3s and you get the scalar you'd expect.
How it works
The node normalizes whatever it receives into a vector, pads to the right size, does the operation component-wise, and returns a value of the requested type. Vectors are handled as tuples so 2D and 3D cases stay clean - cross product is only defined for 3D, and the node tells you if you try otherwise. That "convert anything to a vector, compute, convert back" trick is the Jovimetrix approach to making math truly type-agnostic, and it's why this one node replaces a drawer full of single-purpose math nodes.
Installing it
Part of Jovimetrix:
- ComfyUI Manager - search "Jovimetrix", install.
- Manual -
git clone https://github.com/Amorano/Jovimetrix.gitintocustom_nodes/, thenpip install -r requirements.txt.
No models. Dependencies: numpy, OpenCV, Pillow, matplotlib, cozy_comfyui. Needs ComfyUI 0.1.3+.
Where it fits
Reach for this when you're doing schedule math (animate a value from A to B across a batch), vector work in the pack's VECTOR2/3/4 nodes, or any "combine these two values" moment that would otherwise need three different nodes from three packs. The tensor support added in 2.1.20 means you can even do arithmetic against whole image tensors, which opens up some genuinely weird and fun compositing. The one thing to remember: DIVIDE and SUBTRACT are order-sensitive, so the π swap is your friend. It's not the flashiest node in Jovimetrix, but it's the one that quietly removes a whole class of "I need a math node" interruptions.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| π °οΈopt | * | β | |
| βοΈopt | COMBO | ADD | 22 options: ADD, SUBTRACT, MULTIPLY, DIVIDE, DIVIDE_FLOOR, MODULUS, +16 |
| π ±οΈopt | * | β | |
| πopt | BOOLEAN | false | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| β | * | β |