PS Seed
Random that doesn't eat the seed you liked
- seed
Everyone has been burned by control_after_generate. You get a great image on a random seed, flip the dropdown to fixed to keep it, and the seed is already gone - the widget was holding the next value, and the run you're looking at used the previous one. PS Seed exists to not do that.
It's one of six nodes in ComfyUI PS Bridge Nodes, the ComfyUI half of Vplugins. Standalone it's a seed source for a sampler; connected, it's the seed the Photoshop panel can see and reproduce.
How it works
The node has one number and a mode. Pick random and each new run draws a fresh value - from secrets.randbelow, i.e. a proper CSPRNG, not a timestamp - then pushes the value it actually used back onto the node, so the number sitting in the widget after the run is the one that made the image you're looking at. Pick fixed and every run reuses whatever's in the box.
Under the hood it also refuses to be cached. In random mode the node reports its fingerprint as NaN, which is the standard ComfyUI "this is never up to date" signal, so it re-executes even when nothing else in the graph changed. Without that you'd get a new number only when the cache happened to miss.
The UI has three buttons rather than a dropdown, since the author's own docs lay it out as: the seed on one row, then Fixed / Random / New seed. New seed rolls one immediately and drops you back to Fixed - which is the sane version of "give me a different one but hold it."
There's a Bridge-specific rule that's easy to trip over: when Photoshop drives a run, the seed must be fixed before execution, and the Bridge freezes the actual value for that request so a retry reproduces the same image. Queue a workflow whose PS Seed is in Random mode from Vplugins and the run is rejected rather than silently rerolling. Random is a local-canvas convenience; Fixed is the reproducible mode.
Inputs and outputs
- value - the seed. Default
42, range0to9007199254740991. - mode -
fixedorrandom, defaultfixed. (Plus the three buttons above.) - param_id (
seed) and label (Seed) - advanced binding fields; leave them.
Output: seed (INT). Convert your KSampler's seed widget to an input and wire it there, or feed any other INT seed input.
That upper bound isn't arbitrary. 9007199254740991 is 2^53−1, the largest integer JavaScript represents exactly - necessary here because the workflow and the parameter value travel to the other end of the bridge as canonicalized JSON, and a larger integer would get quietly mangled in transit. Seeds in the widget are literal values with no input socket, so one PS Seed has one source, and there's a hard limit of one per workflow.
Install
ComfyUI Manager → ComfyUI PS Bridge Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/AIGCTV/comfyui-ps-bridge-nodes.git
cd comfyui-ps-bridge-nodes
python -m pip install -r requirements.txt
Restart and hard-refresh (Ctrl+F5). Only two Python deps (rfc8785, jsonschema), no model files, needs a V3-API ComfyUI, classic canvas recommended. Find the nodes under Add Node → 🔷PS Vplugins.
Troubleshooting
"Prepared Seed must be fixed before execution." You're running through the Bridge with Random selected. Set it to Fixed, or rerun it from the ComfyUI canvas where Random is allowed.
Every run gives a different image and you wanted to lock one in. Check the mode before anything else - and to keep a seed, read the number off the node after the run, since in Random mode it's updated to the value that ran rather than showing the next one. That's the opposite of the core seed widget's gotcha and the reason people reach for this node.
The same request gave you two different images. It shouldn't: a Bridge run freezes the seed for that request, so a retry reuses it. If you're getting variation, something else in the graph is randomized - a second seed, a random LoRA picker, or a sampler with its own noise schedule.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| param_id | STRING | seed | — |
| label | STRING | Seed | — |
| value | INT | 420–9007199254740991 | — |
| mode | COMBO | fixed | 2 options: fixed, random |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| seed | INT | — |