RandomInt (Legacy)
A random number you can wire to five things at once
- INT
Every KSampler already has a dice on its seed widget, so why would you ever need a node whose entire job is outputting a random integer? Because the dice rolls that one widget. The moment you want the same random value driving three things - a sampler seed, a filename, a latent count - the widget approach means three separate rolls, and nothing stays in sync. This node fixes that the same way every primitive works: it makes the random value a wire instead of a widget.
What it actually is
RandomInt (the "(Legacy)" suffix is the pack keeping its old node IDs alive) is a plain integer primitive with one twist: its value input has control after generate set to randomize. Each time the graph runs, the widget rolls to a fresh integer, and whatever that roll produced is what comes out the INT socket. Mechanically it's trivial - the execute method just returns the value you feed it. The interesting part is that "randomize on every queue" behavior, which is exactly what a seed widget does, except now the result is a typed socket you can fan out to anywhere.
The name understates it slightly. It's not "random number generator with settings," it's "a random value, treated as data." Same author family as the pack's StaticInt, which is the same node without the dice - they're siblings, one random, one fixed.
How you'll use it
The pattern is right out of ComfyUI's own plumbing handbook: right-click the seed widget on your KSampler (or any int widget), choose Convert widget to input, then drop this node's INT output onto the new socket. Now the seed is defined exactly once on the graph, visible, and shared with whatever else you wire into it. Change nothing else and a run will still randomize every time; re-queue and you get a new seed, but a single seed for the whole workflow rather than several independently-rolled ones.
You'll also see it feeding batch counts, loop iteration counts, and filename tokens in shared workflows.
The one input that matters
Just value (INT), the range of a full 64-bit integer. It's the widget and the data: type a number to pin a specific one, or leave the dice on and let it roll.
Where people get burned
- It does not take a seed. There's no seed input here - if you want a reproducible random number (same roll every run until you change something), you want the pack's RandomIntRange, which accepts a seed and is deterministic. This node is for "roll it and go."
- It rolls every queue, including re-runs of a failed workflow. If you need a run to be repeatable for debugging, pin the value manually or reach for the range node.
- It's an integer. For random floats, look elsewhere - this pack's static-float sibling isn't random, and there's no random float here.
Installing it
This ships in silveroxides/ComfyUI-UtilsCollection. Easiest via ComfyUI Manager: search ComfyUI-UtilsCollection, install, restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
cd ComfyUI-UtilsCollection
pip install -r requirements.txt # opencv-python, typing-extensions
Restart ComfyUI and it's there. No models, no downloads, nothing heavy - this whole pack is dependency-light. It's a small, new collection (AGPL-3.0, mid-2026) from the same author as ComfyUI-ModelUtils and convert_to_quant, so think "utility box," not "big community pack." This node's canonical twin is UC_RandInt; both do the identical thing, the one you found is just the legacy alias.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | INT | -9223372036854776000–9223372036854776000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |