đź’€Prepack Seed
A seed node with a Random button and a visible history — no more lost seeds
- seed
Every ComfyUI user has the same argument with their seed: you want to reproduce a good image, but the seed lived in a widget you didn't write down, or the KSampler's "control after generate" randomized it and now it's gone. The đź’€Prepack Seed is a dedicated seed node that solves the annoying half of that problem. It's one integer widget with a Random button on the node itself and a history panel that keeps the last 50 seeds you've used, right on the canvas.
In a graph where the seed is usually a buried widget on a sampler, this is the difference between "I can find the seed that made the good one" and "I hope I saved the workflow."
How it works
At the Python level it's deliberately minimal: one required seed input (default 0, range up to the full unsigned 64-bit space), and the make_seed function returns it masked to the 64-bit range. That's the whole node server-side - a clean seed provider that produces a plain INT output you wire into any sampler's seed input.
All the personality lives in the bundled JavaScript extension. The frontend adds the Random button right after the seed widget - click it and a fresh random integer is generated and pushed into the widget, the same shape ComfyUI's own random control produces. It also adds a read-only Seed History (Last 50) panel underneath, which logs every seed value the node sees, whether it came from the button, from manual typing, or from a workflow execution that changed the value. Clicking into history lets you read back exactly which seeds you've already tried - the workflow equivalent of keeping a notebook.
The only input that matters is seed (set it, randomize it, or wire a value into it), and the single output is seed, an INT that goes straight into a KSampler or Prepack Ksampler.
Where it fits
The seed is the reproducibility lever in ComfyUI: same seed, same prompt, same settings → same noise, same image. That's why seed management matters more than it seems like it should - the "randomness" in diffusion is entirely seeded noise, not true randomness, and losing the seed means you can't get the happy accident back. This node makes the seed a first-class part of your graph instead of a widget you forget to check. Pair it with the pack's Ksampler and you've got a fully self-contained sampling section.
One honest note: the history is per-node-session and lives in the browser - it's a convenience display, not a persistent database. Restart ComfyUI and the history panel starts empty for that node. The workflow JSON still stores the current seed value, so reloading a saved workflow gets you the last seed, just not the whole list.
Installing it
It's part of the Prepack pack - and because the Random button and history are a JS extension, this is one node where the frontend half matters:
cd ComfyUI/custom_nodes
git clone https://github.com/S4MUEL-404/ComfyUI-Prepack.git
pip install -r ComfyUI-Prepack/requirements.txt
Or search "Prepack" in ComfyUI Manager. Dependencies are just PyTorch, NumPy, and Pillow. Restart ComfyUI, find it under đź’€Prepack. No models, no config.
If the Random button or history panel doesn't show up, it's almost always a stale frontend - hard-refresh the browser (Ctrl+Shift+R) once. The server-side seed node still works without the JS, but you'd lose exactly the two features that make it worth using.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00–18446744073709550000 | Seed value with Random button control. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| seed | INT | The resolved random integer value (unsigned 64-bit range). |