OP BINARY (JOV) π
Add, multiply, XOR and friends across types
- π °οΈ
- π ±οΈ
- π °οΈπ °οΈ
- π ±οΈπ ±οΈ
- β
OP BINARY (JOV) π is the generic "do math with two things" node. Where normal ComfyUI math nodes are typed - this one adds ints, that one multiplies vectors - OP BINARY takes two operands of almost any kind and applies the operation you pick: add, subtract, multiply, divide, modulo, or bitwise ops like AND/OR/XOR. You get one node that covers every binary operation the pack supports, on floats, ints, vectors, or whatever else you throw at it. It's the workhorse for parameter math in procedural workflows, and it's current - still shipping in Jovimetrix 2.x.
The philosophy is worth understanding before you use it: Jovimetrix is built around typed inputs that auto-convert, so OP BINARY feels like a calculator that happens to know about vectors. You don't pick an integer node and a float node and hope; you pick an operation and let the types flow.
How it works
Plug two values into π °οΈ and π ±οΈ, choose what you want done in βοΈ (the operation), and it returns the result as β (any type, list-shaped like all Jovi outputs). The remaining inputs are the usual Jovimetrix conveniences:
- β (TYPE) - the output type you want, so the result comes back as FLOAT, INT, VEC2/3/4, and so on. This is where you decide whether integer division truncates or returns a float.
- π °οΈπ °οΈ / π ±οΈπ ±οΈ (defaults) - fallback values used when an operand port isn't connected. Keep A at (0,0,0,0) and B at (1,1,1,1) and you get the familiar default behavior.
- π - swaps A and B. Handy when you've wired something backwards and don't want to re-run the cable.
Because inputs accept single values or vectors (and the pack even added tensor support in 2.1.20), you can scale a whole batch of parameters in one shot: multiply a wave generator's output by 0.5, or XOR two integer seeds to make a pseudo-random third. For animation pipelines this is the node between your TICK/WAVE GEN and your target parameter.
Where people get burned: division by zero and integer division surprises. Watch the TYPE - if you're dividing ints and expecting 0.5, you'll get 0. Pick FLOAT for anything fractional. And if a result suddenly zeroes out, the node's overflow handling has kicked in, usually because you asked INT for something huge.
Installing it
It's part of the Jovimetrix pack:
# ComfyUI Manager: search "Jovimetrix" and install
cd ComfyUI/custom_nodes
git clone https://github.com/Amorano/Jovimetrix.git
cd Jovimetrix
pip install -r requirements.txt
Restart ComfyUI. Pure calculation - no models, no downloads, nothing beyond the pack's shared dependencies (cozy_comfyui, numpy, etc.).
Troubleshooting
- Wrong result at the edges of a range - your TYPE is probably truncating. Switch to FLOAT or VEC and convert at the boundary.
- Bitwise ops behave oddly on non-integers - bitwise needs integers; feed them or cast with TYPE.
- Result is a list when you wanted a single value - that's normal Jovimetrix behavior; unwrap with a Jovi VALUE node or take
[0]downstream.
It's not glamorous, but OP BINARY is one of those nodes that quietly replaces three others. Once you get used to one node doing all the binary math, the dedicated per-type nodes start to feel like clutter.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| π °οΈopt | BOOLEAN,FLOAT,INT,VEC2,VEC3,VEC4,VEC2INT,VEC3INT,VEC4INT,COORD2D,COORD3D | Passes a raw value directly, or supplies defaults for any value inputs without connections | |
| π ±οΈopt | BOOLEAN,FLOAT,INT,VEC2,VEC3,VEC4,VEC2INT,VEC3INT,VEC4INT,COORD2D,COORD3D | Passes a raw value directly, or supplies defaults for any value inputs without connections | |
| βοΈopt | COMBO | ADD | Arithmetic operation to perform |
| βopt | COMBO | INT | Output type desired from resultant operation |
| πopt | BOOLEAN | false | Flip Input A and Input B with each other |
| π °οΈπ °οΈopt | VEC4 | 0,0,0,0 | value vector |
| π ±οΈπ ±οΈopt | VEC4 | 0,0,0,0 | value vector |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| β | * | O |