Nodes/AusBoss/Seed πŸ†Ž
ComfyUI Node

Seed πŸ†Ž

One seed, every sampler β€” and the button that gets your good seed back

By ausbossΒ·Created 2 months agoΒ·Updated about 22 hours agoΒ· 2
Seed πŸ†Ž
    • seed
    β—„seed0β–Ί

    If you've ever landed a great image on a random seed and lost it - because randomize had already overwritten the number before you could flip it to fixed - this node exists for you. Seed πŸ†Ž puts a seed on its own INT wire, and then does the thing the stock widget doesn't: it remembers the seed you actually ran with.

    One seed, many samplers

    The graph problem is repetition. Two samplers in one workflow, a hires pass, a detail pass, a regional prompt - and they all need the same seed if you want to compare changes honestly. Type the number in each widget and the first time you edit one and miss another, you're no longer comparing one variable. That's the whole discipline, and the community's own advice on it is about as blunt as it gets: change one variable at a time with a fixed seed, or you can't tell what caused the difference. If you randomize and tweak simultaneously, you have no experiment.

    So: drop one Seed node, convert each sampler's seed widget to an input, wire them all to it. Which is where the node earns its keep over a plain PrimitiveInt - it has the same control after generate dropdown a KSampler has, and it reports what came out the other end.

    Inputs and output

    One input: seed. Range 0 to 2βΆβ΄βˆ’1, and the control under the box is Fixed, Random, or Step - Step increments, click it again to decrement. That's the sampler's familiar after-generate control, just readable and shared.

    One output: seed, the value unchanged. Wire it into every sampler that should share it.

    The card face is the interesting part:

    • New seed rolls a fresh value and pins it to Fixed - the move for when a random run landed somewhere good and you want to explore near it rather than from scratch.
    • Use last run puts the seed of the most recent run back in the box and pins it. This is the recovery people actually need, because in Random mode the number in the box is already the next seed while your image is still rendering. The node's backend returns the run's seed as a ui payload precisely so the frontend can show the one that was queued, not the one that replaced it.
    • The row underneath shows the last run's seed, and the β–Ύ menu keeps the last eight. That history saves with the workflow.

    The last-run seed comes from the backend's own execution, so it's right even if your install has the global widget control mode set to Before rather than After - and even when the node's output was served from cache.

    The trap it's built around

    Stock ComfyUI: control_after_generate fires after the run, so the seed shown is the one that will be used next. Find a good image, flip the dropdown to fixed, and you've already lost the good seed. The global fix is setting the widget control mode to Before once per install, in ComfyUI's settings - but a shared workflow can't retrofit your settings, and that's the gap this node closes.

    Two small limitations worth knowing. The value box accepts the full 2βΆβ΄βˆ’1 range, but seeds rolled by the buttons stay under 2⁡⁰ - the same ceiling ComfyUI's own randomize uses - so the displayed number stays exact instead of losing precision in JavaScript. And if you convert seed to an input, the box goes read-only, because the wire owns it now.

    Installing it

    ComfyUI Manager β†’ search AusBoss, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ausboss/ComfyUI-AusBoss.git
    

    Restart and hard-refresh with Ctrl+Shift+R. Nothing to download, no extra Python packages, ComfyUI 0.27.1 minimum.

    If the seed field on a sampler is still a widget, right-click it and Convert widget to input before wiring this in - that's the step people skip, and the graph will happily let you leave the old number in place and wonder why the seed node does nothing.

    CategoryπŸ†Ž AusBoss/Utility

    Inputs (1)

    NameTypeDefaultDescription
    seedINT00–18446744073709550000The seed sent down the wire. The control beneath it decides what happens after each queue: fixed keeps it, randomize picks a new one.

    Outputs (1)

    NameTypeDescription
    seedINTThe seed, unchanged β€” wire it to every sampler that should share it.