Next Seed
Deriving a fresh seed from an old one without leaving the graph
- next_seed
Next Seed does exactly what it says: hand it a seed, get back a different one, in the full 64-bit range ComfyUI seeds live in. It sounds trivial until you hit the actual problem it solves - ComfyUI's built-in seed widget has a "randomize" control, but that control lives on the widget itself, not as something you can wire as data between nodes. The moment you want a workflow where seed B is deterministically derived from seed A - a loop, a multi-stage pipeline, a batch where each stage needs its own seed but you still want the whole run reproducible from one starting number - the stock widget can't give you that. Next Seed can: it's a real INT-in, INT-out node, so you can chain it.
The mechanism, read honestly. The README describes it as producing "a new random seed in the full 64-bit range" from the input seed. It doesn't spell out the exact derivation, and there's no source to check from here, but the framing lines up with the rest of the pack's seed-based nodes (Random Float, Random Int, Random Ratio), which are all explicitly "seeded for reproducibility" - the safe assumption is that the same input seed always produces the same output seed, which is the only way this node earns its keep as a wireable, reproducible building block rather than just being a fancier randomize button.
The input and output. seed is an INT from 0 up to roughly 1.84×10¹⁹ - that's 2⁶⁴−1, the full unsigned 64-bit ceiling, matching the range you'll see on the pack's other seed-typed inputs (Random Ratio, Vertical Wildcard Picker). The single output, next_seed, is the derived value. Wire it into a downstream KSampler's seed, feed it right back into another Next Seed to build a chain, or hand it to any of the pack's other seed-driven nodes.
Installing it. No dependencies beyond the pack itself - pure integer math. Search "comfyui_gr85" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/veighnsche/comfyui_gr85
Restart ComfyUI and it's there.
One real gotcha worth knowing. This node accepts seeds up to the full unsigned 64-bit max (2⁶⁴−1), but plenty of ComfyUI's own stock nodes - including some sampler seed widgets, depending on your ComfyUI version - cap out at the signed 64-bit max (2⁶³−1), half that range. If you chain several Next Seed calls and eventually feed the result into a stock seed widget that rejects it, the fix is a modulo or bitmask (seed & 0x7FFFFFFFFFFFFFFF) before it hits the sampler, not a bug in this node - it's just operating in a wider range than some of its neighbors expect.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| next_seed | INT | — |