Constant Int
Constant Int — a named number that's actually readable in your graph
- value
Here's a subtle ComfyUI habit worth picking up: when the same number appears in five places across a workflow, you don't want five copies of it. You want one box that holds the value, so changing it later means changing one thing instead of five. That's what this node is - a single INT value with a single INT output, so you can wire one number to many places. It's the "name a constant once, reuse it everywhere" node from the Utilitools pack.
One required input: value (INT, from -999999 to 999999, default 0, step 1). One output: value, the same integer. It's a pass-through with a widget - the entire mechanism is return (value,). Type a number, get that number out. There's nothing else, and that's the whole point.
Why a constant node beats typing the number everywhere
The real value is workflow hygiene. ComfyUI lets you inline numbers on most nodes, so a Constant Int feels redundant - until you realize that every place you typed "64" by hand has to be found and re-typed when you decide the batch is now 32. Wire all of them to one Constant Int and it's a single edit. Give the node a descriptive title in ComfyUI and your graph starts reading like a spec sheet: "Base Resolution," "Batch Size," "Seed Offset" - the number isn't just a number anymore, it's a named parameter.
It also plays well with the pack's other nodes. Feed a Constant Int into a math node or a List Index, drive a counter with it, or use it as the branch value for If Then Else. Since the output is a proper INT, it connects cleanly to anything expecting an integer - steps, batch sizes, dimensions.
The honest caveats
A constant is only useful if you actually reuse it. If a number appears exactly once, this node adds a box without adding value - skip it and type the number inline. And keep in mind the value is a workflow constant, not a variable: nothing in this pack mutates it at runtime. If you want a value that changes as a workflow runs, that's a Counter or a calculation, not a constant. The range (-999999 to 999999) is plenty for anything a sampler or image size accepts, so you're unlikely to hit the ceiling.
Installing it
Standard Utilitools install:
cd ComfyUI/custom_nodes
git clone https://github.com/aesethtics/ComfyUI-Utilitools
or search "Utilitools" in ComfyUI Manager and restart ComfyUI. It's under Utilitools → Constants, alongside Constant Float and Constant String. No dependencies, no downloads - the whole pack is pure Python. Small pack, no community buzz, but the constants trio is the unglamorous backbone that makes the pack's math and logic nodes pleasant to wire.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | INT | 0-999999–999999 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | INT | — |