ezMath
A compact 3-input math node for ComfyUI
- value
ezMath is the pack's answer to needing "one number derived from a couple others" without dragging in a bulky math-node suite. Three inputs, ten operations, one output - it's built to sit inline in a grid workflow and compute something like "base value plus index times step" without a chain of separate add/multiply nodes.
How it works
Pick an operation from the dropdown and feed it up to three numbers - a, b, c - depending on what that operation needs. The op list covers the basics you'd expect (add, subtract, multiply-add, divide, modulo, min/max across all three, floor, ceiling) plus round, which uses b as the decimal-places argument rather than a third operand. It reads more like a scientific calculator's function list than a full expression evaluator, which is the point - it's meant to be quick to wire, not to replace a proper math node for anything complex.
In an ezXY grid, the obvious use is deriving one swept value from another: feed a a base CFG, b a step size, c your Iteration Driver output, and pick multiply add (a*b+c) to get a per-cell value without hand-typing a Numbers to List string.
Inputs and outputs
operation- a dropdown of 10 choices: add (a+b+c), subtract (a-b-c), multiply add (a*b+c), divide (a/b), modulo (a%b), maximum, minimum, floor (a), ceiling (a), and round (a to b decimals).a,b,c- float inputs, default 0, each individually wireable or left as static widgets. Which ones matter depends on the operation you picked - floor and ceiling only look ata, for instance.value- the single float result.
Installing ComfyUI_ezXY
ComfyUI Manager: search "ComfyUI_ezXY", install, restart. Manual clone:
cd ComfyUI/custom_nodes
git clone https://github.com/GMapeSplat/ComfyUI_ezXY.git
No models, nothing heavy to install.
Common issues & troubleshooting
The easiest mistake is picking an operation and not realizing which inputs it actually reads - floor/ceiling ignore b and c entirely, divide and modulo ignore c, so if you're getting a result that doesn't match what you expected, double-check the operation's inputs against what you actually wired rather than assuming the node is broken.
Same standing pack-wide note as everywhere else in ComfyUI_ezXY: the README states directly that it doesn't work with the current version of ComfyUI, and there's real evidence of the pack going stretches without maintenance - a 2025 GitHub issue shows someone asking to fork a single node out because the repo had broken and the author wasn't around to fix it. ezMath is about as self-contained as a node gets (no lists, no type-casting tricks, just arithmetic), so it's less likely than the list/driver nodes to be the thing that's actually broken if your workflow fails - but if it does throw, it's worth checking whether the crash is really coming from here or from the pack's runtime patching further down the graph.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| operation | COMBO | 10 options: add (a+b+c), subtract (a-b-c), multiply add (a*b+c), divide (a/b), modulo (a%b), maximum (abc), +4 | |
| a | FLOAT | 0.00-9999–9999 | — |
| b | FLOAT | 0.00-9999–9999 | — |
| c | FLOAT | 0.00-9999–9999 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | FLOAT | — |