INT Constant
One number, wired to as many places as you want
- value
INT Constant is about the simplest node in the pack: it holds a single whole number and outputs it. That's it. But don't let the simplicity fool you into thinking it's pointless - it's a workflow-organization tool, and on a big graph it's the difference between changing one number and hunting down the same number typed into eight different nodes.
The use case is a single source of truth. Say your width, your empty latent, and three resize nodes all need to agree on 1024. Type that into each one and the day you switch to 1216 you're editing five places and inevitably missing one. Put it in an INT Constant instead, wire that one output everywhere, and now there's exactly one number to change. This is the same reason programmers use named constants instead of scattering magic numbers through their code.
How it works
It has one field - a value - and one output that emits it. No computation, no model, no side effects. It just makes a fixed integer available as a wire.
Inputs and outputs
- value - the integer to hold. The range is enormous (roughly ±1.8×10¹⁹), so anything you'd plausibly need - a dimension, a step count, a frame number, a seed - fits comfortably.
- Output: value, the INT, ready to fan out to as many inputs as you like.
Where it wires in
Anywhere an integer input lives. The classic pattern is at the top of a workflow: a little cluster of constants (width, height, steps, frame count) feeding the whole graph, so all your tunable numbers sit in one place instead of buried inside twenty nodes. It's especially powerful paired with KJNodes' own Set/Get nodes - set the constant once, "get" it wherever you need it, and you've got a clean, readable graph with your parameters hoisted to the top. That readability is the entire point of the constants category this node lives in.
Installing it
Comes with kijai's KJNodes pack.
- ComfyUI Manager - search KJNodes for ComfyUI, install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-KJNodes, thenpip install -r requirements.txt, and restart.
No dependencies whatsoever - it's a number in a box.
Common issues
Genuinely almost none - this is as robust as a node gets. The only thing to get right is that it's an INT, integers only. If a downstream node wants a float (a CFG scale, a denoise strength, a LoRA weight), this is the wrong constant - reach for a float constant instead, or you'll get a type mismatch at the wire. Whole numbers - dimensions, steps, counts, seeds - are its whole job.
The other "issue" is under-using it. Plenty of people type the same dimension into every node out of habit and never feel the pain until a big edit goes wrong. If you find yourself changing the same number in multiple spots, that's the signal to hoist it into one of these and wire it out. Small node, real payoff on anything you'll edit more than once.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | INT | 0-18446744073709550000–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | INT | — |