ComfyMath
Provides Math Nodes for ComfyUI. Boolean Logic, Integer Arithmetic, Floating Point Arithmetic and Functions, Vec2, Vec3, and Vec4 Arithmetic and Functions
Nodes (53)
AND, OR, XOR and friends for two booleans
Turn a true/false into a 1 or 0
Flip a true to a false
Split a VEC2 into its two float components
Split a VEC3 into its three float components
Split a VEC4 into its four float components
Bundle two floats into one VEC2 wire
Bundle three floats into one VEC3 wire
Bundle four floats into one VEC4 wire
Compare two floats, get a true/false
An actual calculator inside your graph
Get a whole number out of a decimal one
The decimal on-ramp into ComfyMath's NUMBER nodes
Turn one float into a true/false gate
A scientific calculator for one float
Compare two integers and get a boolean back
Arithmetic and bitwise logic on whole numbers
The cleanest way to turn a number into a real boolean
The other half of ComfyMath's type-converter pair
Feed an integer into ComfyMath's own math nodes
Quick true/false checks on a single integer
Integer math without a Python node
Find the right SDXL size from an image
Feed it any image, get the closest SDXL bucket
Compare two generic numbers
One arithmetic node for both ints and floats
Cast ComfyMath's generic number to a real FLOAT
Cast ComfyMath's generic number to a real INT
Test one generic number, get true or false
Negation, roots, logs, and trig for one value
Pick a good SDXL size from a dropdown
A dropdown of SDXL's actual trained resolutions
Check if two 2D vectors match
Add, subtract, or cross two 2D vectors
Scale a 2D vector by a plain number
Get a single number out of two 2D vectors
Get the length of a 2D vector
Check if a 2D vector is zero or unit length
Negate or normalize a 2D vector
Check if two 3D vectors match
Add, subtract, or cross two 3D vectors
Scale a 3D vector by a plain number
Get a single number out of two 3D vectors
Get the length of a 3D vector
Check if a 3D vector is zero or unit length
Negate or normalize a 3D vector
Check if two 4D vectors match
Add, subtract, or cross two 4D vectors
Scale a 4D vector by a plain number
Get a single number out of two 4D vectors
Get the length of a 4D vector
Check if a 4D vector is zero or unit length
Negate or normalize a 4D vector
ComfyMath
Provides Math Nodes for ComfyUI
Features
Provides nodes for:
- Boolean Logic
- Integer Arithmetic
- Floating Point Arithmetic and Functions
- Vec2, Vec3, and Vec4 Arithmetic and Functions
Installation
From the custom_nodes directory in your ComfyUI installation, run:
git clone https://github.com/evanspearman/ComfyMath.git