Conditional Seed (Oli)
A seed node with an on/off switch
- seed
Conditional Seed (Oli) is a one-output seed node with a gate. When the gate is off it's a boring, reliable seed passthrough. Flip it on and it starts behaving like a proper seed node - randomize, increment, decrement, or hold fixed, your choice - after each run. The useful part is that the gate is just another input, so "should this seed change at all" becomes a condition in your workflow instead of a widget you babysit.
How it works
enable_rule is the switch. False (default) → the node returns seed_value untouched, forever. True → it applies control_after_generate and hands you the new seed, while persisting the "next" value so a later run - even with the rule off again - continues from where it left off.
That persistence is worth calling out. The state is stored per node instance, keyed by the node's unique ID, in ComfyUI's user directory (<user>/oli-prompt-tools/conditional_seed_state.json) - not inside the package, so updating the pack won't wipe your running seed.
Inputs and output
- seed_value - the working seed (0 to 2⁵⁰−1).
- control_after_generate -
fixed,randomize,increment, ordecrement. - enable_rule - the gate.
Output is a single seed INT, wired to your KSampler like any other seed. The max is deliberately capped at 2⁵⁰−1 rather than ComfyUI's usual 2⁶⁴−1, because values above 2⁵³ lose precision in JavaScript's number type and the widget display would drift from what Python actually output. Easy Seed (in ComfyUI-Easy-Use) caps at the same value for the same reason.
Install & gotchas
cd ComfyUI/custom_nodes
git clone https://github.com/magicoli/comfyui-oli-prompt-tools
…or ComfyUI Manager → Oli Prompt Tools, then restart. No dependencies.
Two things to know. First, this node is newer than the README's node table - it ships in the code and loads fine, the docs just lag. Second, it's an output node with state, so it's expected to be uncached and re-run every queue; that's by design, otherwise the seed would never advance.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| seed_value | INT | 00–1125899906842623 | — |
| control_after_generate | COMBO | randomize | 4 options: fixed, randomize, increment, decrement |
| enable_rule | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| seed | INT | — |