State Seed
An editable seed node the State Manager can save and restore
- state_control
- SEED
State Seed is a small value node that holds one integer and hands it to your sampler. Nothing magical in isolation - the value lives in the pack because the State Manager can capture and restore it as part of a saved character or prompt preset, and because it understands rgthree-style special seed values.
Reach for it when you're building the State Manager wiring described in the README: you want per-preset seed memory, or you want one seed source fanned out to several samplers instead of typing the same number into every KSampler and praying they match. That's the classic plumbing problem - one source, many consumers - and this node is the typed source.
How it works
The required seed widget defaults to -1 (an INT with a huge allowed range), and there's an optional state_control input of type STATE_MANAGER_CONTROL. That input does two jobs: it's the editor-only link the State Manager's Save connected / Load connected actions use to discover the node, and at runtime it carries the resolved seed from the saved state when connected. The frontend resolves rgthree-style special seed values before queueing, and the backend keeps them working for API paths. The single output, SEED (INT), plugs straight into a sampler's seed input.
If -1 or a special value makes you nervous, that's the same trap as any seed widget: the sampler gets what the node emits, so if the manager isn't connected, a -1 can mean "pick random" depending on how your sampler handles it. And the general seed footgun applies - if you land on a good image, set control_after_generate to fixed before you change anything else, or the shown seed gets overwritten after the run. The best fix is ComfyUI's widget control mode set to Before instead of After so the box shows the seed actually used.
Wiring
The README's recommended shape is minimal:
State Manager.state_control → State Seed.state_control
State Seed.SEED → KSampler.seed
Connect the seed only to sampler seed inputs. Don't try to use it to drive prompt text or anything else - that's what State Text Box is for.
Install
Part of the ComfyUI-DoRA-Dynamic-LoRA-Loader pack: search it in ComfyUI Manager, or clone the repo into custom_nodes and restart. No separate install, no dependencies. If your workflow uses plain KSampler seeds and you never touch the State Manager, you don't need this node - it exists to be managed, not to sit alone.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | -1-1125899906842624–1125899906842624 | — |
| state_controlopt | STATE_MANAGER_CONTROL | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SEED | INT | — |