Nodes/RES4LYF/SeedGenerator
ComfyUI Node Runs on cloud

SeedGenerator

One seed, plus the next one, on demand

By ClownsharkBatwing·Created 2 years ago·Updated 17 days ago· 1,222
SeedGenerator
    • seed
    • seed+1
    seed0

    Small node, small job, does it well. SeedGenerator holds a seed and hands you two numbers: the seed, and the seed plus one. That's genuinely it - but it's the kind of plumbing that keeps a multi-stage RES4LYF workflow from drifting out of sync.

    Why would you want seed+1? A lot of the pack's more advanced setups run two passes - a composition/guide pass and a main pass, or an unsample then a resample. You usually want those on related but different noise. Feeding the same seed to both can make them fight; feeding two totally random seeds makes the run non-reproducible. Seed and seed+1 gives you a deterministic pair: change the one seed and both passes move together, predictably.

    How it works

    You set a single seed value on the node. It outputs that value on one wire and value+1 on the other. Both are plain integers, so they drop into any node that takes a seed - a KSampler, one of the Shark samplers, a noise node, whatever. Because it's a real node with control_after_generate on its widget, you can set it to increment/fixed/randomize and drive your whole graph's seeding from this one spot instead of hunting down every sampler's seed field.

    The inputs and outputs that matter

    • seed (INT) - the one number you set. Everything derives from this.
    • seed (INT, output) - the value, passed straight through.
    • seed+1 (INT, output) - the value incremented by one.

    Wire the first output into your primary sampler and the second into the secondary pass (or vice versa - the point is they stay one apart and reproducible).

    How to install it

    ComfyUI Manager: search RES4LYF, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ClownsharkBatwing/RES4LYF
    cd RES4LYF
    pip install -r requirements.txt
    

    Portable ComfyUI: swap pip for the embedded one. Restart and hard-refresh with F5. No downloads.

    Common issues & troubleshooting

    My results still aren't reproducible. A seed only pins the parts of your graph that consume it. If something upstream (a different noise source, an ancestral sampler adding fresh noise every step) isn't seeded from here, it'll still wander. Trace every seed field and every noise input back to a fixed source.

    Do I even need this? If you only run one sampler, no - set its seed and move on. SeedGenerator earns its keep specifically when two or more stages should share a reproducible seed relationship. For a single-pass txt2img it's overkill.

    Seed range looks huge. The max is the full 64-bit unsigned range (about 1.8×10^19). That's normal - it's just the space ComfyUI seeds live in. You don't need to pick a "good" number; one seed is as valid as any other.

    Control after generate. If your seed keeps changing between runs when you wanted it fixed, check the widget's control_after_generate is set to fixed, not randomize. That setting lives on this node now, so it's the one to change.

    CategoryRES4LYF/utilities

    Inputs (1)

    NameTypeDefaultDescription
    seedINT00–18446744073709550000

    Outputs (2)

    NameTypeDescription
    seedINT
    seed+1INT