Integer
A number with one home, and the seed question it can't answer
- Integer
The primitive value node is the least glamorous thing in ComfyUI and the one that quietly fixes half your workflow hygiene: one number, one place, many wires.
What it's for
Core ComfyUI ships PrimitiveInt for this, so why another? Because the packs people actually build with don't all send you to core, and because this one lands in the same menu as the rest of this pack's typed constants. Practically, one integer source in a graph is doing a lot of work:
- Width and height, feeding a latent, a crop, an upscale and a filename template, so a resolution change is one edit.
- Steps, when you're running two samplers on the same schedule and want them to agree.
- Batch size, which people set in one place and then wonder why the save node wrote four files.
- A seed you want to reuse deliberately.
The last one carries the caveat, and it's worth understanding rather than discovering.
How it works
One input, int_val: INT, default 0, step 1, bounds that are effectively ±2^64 - the author used 0xffffffffffffffff as the limit, so there's no practical ceiling. The class returns int(int_val), which is what you'd hope. The single output is named Integer and typed INT.
Wire it into any converted INT socket - steps, width, height, batch_size, a crop offset. Because it's an INT, it will not attach to a FLOAT input; ComfyUI greys those links out. That's not a bug, but it does catch people converting a denoise widget and then trying to feed it this node.
Now the seed caveat, and this is the thing worth reading twice. On a KSampler, the seed widget has a second little dropdown next to it - control_after_generate - with fixed, increment, decrement and randomize. That behaviour belongs to that widget, not to the number. When you convert the seed to an input and drive it from a primitive integer, you are handing over a fixed value every run; there's no randomize-per-run happening anywhere. If you want a new seed each queue, keep the sampler's own widget, or use a seed/primitive node from a pack that ships its own control dropdown. Related, and it has burned everybody: by default that control fires after the run, so the number in the box is the one for next time. Set the "widget control mode" option to Before once per install and stop losing good seeds.
Installing it
ComfyUI-MDSNodes, by MarwanDSAI. Manager: search ComfyUI-MDSNodes or MDSNodes and install, then restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/MarwanDSAI/comfyui-mdsnodes
# restart ComfyUI
Nothing to pip install and nothing to download - the repo's requirements.txt is empty and the README states the pack runs on standard ComfyUI dependencies.
Search Integer; the pack's category is MDSNodes/Constants. Expect the search to also surface core's PrimitiveInt, which does the same job - either is fine.
Common issues
Not in the node list. These constants arrived in version 1.8.0 (September 2026). Update the pack through Manager and restart.
Your resolution runs but the image is 8 pixels off. Width and height have step 1, so you can type 1000 even though latents are eighth-resolution. Nothing here will stop you; the rounding happens downstream and invisibly. Keep to multiples of 8 yourself.
The seed doesn't change between runs. Covered above - that's the primitive's price, not a setting you missed.
A cloned value still drifts. If you have two integer nodes, one feeding the sampler and one feeding the filename, they're two sources with one name. The whole point is to have one.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| int_val | INT | 0-18446744073709550000–18446744073709550000 | Integer value (whole number). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Integer | INT | The fixed integer value. |