Extensions/ComfyMath
ComfyUI Extension

ComfyMath

Provides Math Nodes for ComfyUI. Boolean Logic, Integer Arithmetic, Floating Point Arithmetic and Functions, Vec2, Vec3, and Vec4 Arithmetic and Functions

By evanspearman·Created 3 years ago·Updated about a year ago· 192
evanspearman/ComfyMath
Nodes53
On cloudLocal install
Categorymath/bool, math/conversion
Stars192
Updatedabout a year ago

Nodes (53)

BoolBinaryOperation

AND, OR, XOR and friends for two booleans

math/bool
BoolToInt

Turn a true/false into a 1 or 0

math/conversion
BoolUnaryOperation

Flip a true to a false

math/bool
BreakoutVec2

Split a VEC2 into its two float components

math/conversion
BreakoutVec3

Split a VEC3 into its three float components

math/conversion
BreakoutVec4

Split a VEC4 into its four float components

math/conversion
ComposeVec2

Bundle two floats into one VEC2 wire

math/conversion
ComposeVec3

Bundle three floats into one VEC3 wire

math/conversion
ComposeVec4

Bundle four floats into one VEC4 wire

math/conversion
FloatBinaryCondition

Compare two floats, get a true/false

math/float
FloatBinaryOperation

An actual calculator inside your graph

math/float
FloatToInt

Get a whole number out of a decimal one

math/conversion
FloatToNumber

The decimal on-ramp into ComfyMath's NUMBER nodes

math/conversion
FloatUnaryCondition

Turn one float into a true/false gate

math/float
FloatUnaryOperation

A scientific calculator for one float

math/float
IntBinaryCondition

Compare two integers and get a boolean back

math/int
IntBinaryOperation

Arithmetic and bitwise logic on whole numbers

math/int
IntToBool

The cleanest way to turn a number into a real boolean

math/conversion
IntToFloat

The other half of ComfyMath's type-converter pair

math/conversion
IntToNumber

Feed an integer into ComfyMath's own math nodes

math/conversion
IntUnaryCondition

Quick true/false checks on a single integer

math/int
IntUnaryOperation

Integer math without a Python node

math/int
NearestSDXLExtendedResolution

Find the right SDXL size from an image

math/graphics
NearestSDXLResolution

Feed it any image, get the closest SDXL bucket

math/graphics
NumberBinaryCondition

Compare two generic numbers

math/float
NumberBinaryOperation

One arithmetic node for both ints and floats

math/number
NumberToFloat

Cast ComfyMath's generic number to a real FLOAT

math/conversion
NumberToInt

Cast ComfyMath's generic number to a real INT

math/conversion
NumberUnaryCondition

Test one generic number, get true or false

math/Number
NumberUnaryOperation

Negation, roots, logs, and trig for one value

math/number
SDXLExtendedResolution

Pick a good SDXL size from a dropdown

math/graphics
SDXLResolution

A dropdown of SDXL's actual trained resolutions

math/graphics
Vec2BinaryCondition

Check if two 2D vectors match

math/vec2
Vec2BinaryOperation

Add, subtract, or cross two 2D vectors

math/vec2
Vec2ScalarOperation

Scale a 2D vector by a plain number

math/vec2
Vec2ToScalarBinaryOperation

Get a single number out of two 2D vectors

math/vec2
Vec2ToScalarUnaryOperation

Get the length of a 2D vector

math/vec2
Vec2UnaryCondition

Check if a 2D vector is zero or unit length

math/vec2
Vec2UnaryOperation

Negate or normalize a 2D vector

math/vec2
Vec3BinaryCondition

Check if two 3D vectors match

math/vec3
Vec3BinaryOperation

Add, subtract, or cross two 3D vectors

math/vec3
Vec3ScalarOperation

Scale a 3D vector by a plain number

math/vec3
Vec3ToScalarBinaryOperation

Get a single number out of two 3D vectors

math/vec3
Vec3ToScalarUnaryOperation

Get the length of a 3D vector

math/vec3
Vec3UnaryCondition

Check if a 3D vector is zero or unit length

math/vec3
Vec3UnaryOperation

Negate or normalize a 3D vector

math/vec3
Vec4BinaryCondition

Check if two 4D vectors match

math/vec4
Vec4BinaryOperation

Add, subtract, or cross two 4D vectors

math/vec4
Vec4ScalarOperation

Scale a 4D vector by a plain number

math/vec4
Vec4ToScalarBinaryOperation

Get a single number out of two 4D vectors

math/vec4
Vec4ToScalarUnaryOperation

Get the length of a 4D vector

math/vec4
Vec4UnaryCondition

Check if a 4D vector is zero or unit length

math/vec4
Vec4UnaryOperation

Negate or normalize a 4D vector

math/vec4
Readme

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