Nodes/LF Nodes/Urandom Seed Generator
ComfyUI Node

Urandom Seed Generator

Twenty fresh seeds per run, straight from your CPU's entropy

By lucafoscili·Created 2 years ago·Updated 2 years ago· 50
Urandom Seed Generator
  • fixed_seeds
  • ui_widget
  • fixed_seeds_dataset
  • seed
  • seed
  • seed
  • seed
  • seed
  • seed
  • seed
  • seed
  • seed
  • seed
  • seed
  • seed
  • seed
  • seed
  • seed
  • seed
  • seed
  • seed
  • seed
  • seed
regen_each_runtrue

The fastest way to explore a prompt is to rerun it with a new seed and see what the sampler does differently. If you have one KSampler, that's a widget you scrub. If you have eight KSamplers doing multi-pass or multi-view generation, you want a seed factory - and that's exactly what UrandomSeedGenerator is: one node, twenty seed outputs, refreshed from OS-level randomness every run.

The mechanism is more interesting than the UI suggests. Instead of Python's random (which is seeded and predictable), it uses os.urandom(4) - cryptographic-strength entropy pulled from the OS - and mixes in the current timestamp, then sleeps briefly between draws to let the entropy pool shift. That's the "urandom" in the name, and it's the same source of randomness that secures TLS sessions, which is overkill for seeds but does mean you never get the boring colliding sequences a naive generator produces.

The inputs that matter:

  • regen_each_run (default true) - new seeds every run. Turn it off and it holds the last set, which is how you get reproducible-enough behavior for debugging.
  • fixed_seeds - a Ketchup Lite-compatible JSON dataset holding the previous 20 seeds; feed it back in and those seeds are preserved while the rest regenerate.

The outputs are the interesting part: fixed_seeds_dataset (the whole 20-seed set as JSON) plus twenty separate seed INT outputs, one per KSampler. The pattern people actually use: feed each KSampler its own seed output, keep fixed_seeds_dataset wired back into the node's fixed_seeds input, and every run gives all twenty samplers fresh, independent seeds while keeping the history intact. The KUL_TREE widget shows the batch.

Where this beats a plain seed box: multi-model or multi-pass pipelines where you want every path exploring independently each run, and LoRA-testing grids where seed variety is the whole point. It's also nice for animation work where you want a distinct seed per frame without hand-picking them.

Installing LF Nodes - same pack, same steps:

  • ComfyUI Manager → search "LF Nodes" → install → restart, or
  • cd ComfyUI/custom_nodes && git clone https://github.com/lucafoscili/comfyui-lf then restart.

Gotchas worth knowing. The repo is in legacy mode (frozen, migrated to lucafoscili/lf-nodes); this node carries over unchanged. There's a subtle timing thing in the implementation - a couple of seeds get XORed with the timestamp based on the wall-clock second - so you'll occasionally see two outputs land very close together; it's cosmetic, not a bug. And regen_each_run off doesn't freeze seeds forever across a restart, since the dataset lives in the widget, not on disk. If you need true persistence, pair it with the pack's JSON save nodes.

Category✨ LF Nodes/Seed generation

Inputs (3)

NameTypeDefaultDescription
regen_each_runBOOLEANtrueGenerates new random seeds each run, while still keeping the seeds fed through the fixed_seeds JSON.
fixed_seedsoptJSON[object Object]A Ketchup Lite-compatible dataset containing 20 previously generated seeds.
ui_widgetoptKUL_TREE[object Object]

Outputs (21)

NameTypeDescription
fixed_seeds_datasetJSON
seedINT
seedINT
seedINT
seedINT
seedINT
seedINT
seedINT
seedINT
seedINT
seedINT
seedINT
seedINT
seedINT
seedINT
seedINT
seedINT
seedINT
seedINT
seedINT
seedINT