HWP Global Seed
One number to set, every sampler in the graph follows
- seed
- noise
The one-slider workflow
Your graph has a main KSampler, a hires-fix pass, maybe a second model branch, and every single one has its own seed field. The "proper" way to keep them in lockstep is to convert each seed widget to an input and fan one rgthree Seed or Primitive node out to all of them - the canonical pattern covered in comfyui-node-plumbing.md. HWP Global Seed is the lazy alternative: drop it anywhere, set one number, and at queue time it reaches into the workflow and rewrites every seed, seed_num, and noise_seed widget it can find. No wires, no converted inputs, no hunting. It's a broadcast node, not a wire node - and that distinction is the whole thing to understand before using it.
How it actually works
HWP Global Seed doesn't push data through connections. The pack registers a server-side on_prompt hook, and right before your prompt runs it walks the whole workflow's prompt JSON, takes the value from the one CustomGlobalSeed node, and rewrites any input whose name is seed, seed_num, or noise_seed and whose value is a plain integer. Then it pushes the new values back to the browser over a websocket so the widgets on screen update to match what just ran. That rewrite-by-name is also the mechanism's sharp edge, so keep reading.
The inputs that matter
The node has a handful of widgets; you'll actually touch three of them.
- value - the seed. Everything else derives from it.
- action -
fixed,increment,decrement, orrandomize, plus the... for each nodevariants. Plain actions hand the same resolved seed to every seed widget in the graph. The "for each node" variants walk downstream and hand out successive values (value,value+1,value+2…), so a main pass and a second pass get different-but-related seeds instead of identical noise. - mode - a toggle between
control_before_generate(default) andcontrol_after_generate. Familiar? It's the same mechanic as every seed widget's built-in control, and the default here is the "before" behavior the community tells everyone to switch to - the number in the box is the one that just ran, not the one queued next.
max_seed is the wrap ceiling for increment/decrement (and the cap for randomize); leave it at 0 and it defaults to 1125899906842624 - that's 2^50, chosen deliberately because it stays inside JavaScript's safe-integer range for the UI. logging flips between default (one summary line per run in the console) and verbose (adds every per-node update) - your debugging lever.
The outputs
Two, and the second is the sleeper feature. seed (INT) is the resolved value - mostly for reading or piping into a text node. noise (NOISE) is the same seed wrapped by ComfyUI's own Noise_RandomNoise, ready to plug straight into a SamplerCustomAdvanced's noise input - custom-sampling graphs usually need a separate RandomNoise converter just to get a NOISE object from a seed. Here it's already there. Caveat: that output needs a ComfyUI recent enough to ship comfy_extras.nodes_custom_sampler; on an ancient install the node logs that NOISE is unavailable and the output is None.
Where it helps - and where it bites
This is a great node for handing a workflow to someone who just wants one seed slider and doesn't want to learn convert-widget-to-input. The 🎲 "Manual Random Seed" button under the node queues a run with a fresh random value, and last_seed records what ran before (only when it actually changed).
Now the sharp edge, straight from the source: the rewrite matches input names, not node roles. Any node in the graph with an integer input named seed, seed_num, or noise_seed gets rewritten - including the internals of other packs' detailer nodes. Want a sampler to stay independent? Convert its seed widget to an input (wired inputs arrive as links, not integers, so the broadcast skips them), or use a "for each node" action so they at least differ. And don't drop two CustomGlobalSeed nodes into one graph expecting them to merge - the handler stops at the first one it finds, so only one dispatches.
Installation
This is part of the small hwprinz/ComfyUI-HWP-Nodes pack (four nodes, MIT, no Python dependencies, no model downloads - there isn't even a requirements.txt). Install it once and all four HWP nodes appear under the HWP category.
Via ComfyUI Manager, search "ComfyUI-HWP-Nodes" and install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/hwprinz/ComfyUI-HWP-Nodes
Then restart ComfyUI. It's a young, one-author pack, so if something misbehaves the GitHub issues page is the place. You'll know it loaded: it greets you with a rainbow registration banner.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| value | INT | 00–18446744073709550000 | — |
| modeopt | BOOLEAN | true | — |
| actionopt | COMBO | 7 options: fixed, increment, decrement, randomize, increment for each node, decrement for each node, +1 | |
| last_seedopt | STRING | — | |
| max_seedopt | INT | 00–18446744073709550000 | Maximum seed value (0 = default: 1125899906842624) |
| loggingopt | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| seed | INT | — |
| noise | NOISE | — |