Nodes/ComfyUI-Distributed/Distributed Seed
ComfyUI Node

Distributed Seed

Give every GPU a different seed so parallel runs aren't clones

By robertvoy·Created about a year ago·Updated 24 days ago· 582
Distributed Seed
    • seed
    seed1125899906842

    Distributed Seed is a tiny node that solves an embarrassing problem: if you fan the same workflow out to four GPUs and they all use the same seed, you get four identical images. Congratulations, you've quadrupled your electricity bill for one result. This node is the fix. It hands each worker a different seed so parallel generation actually produces four different images in the time one card would've taken for a single one.

    It's one of the two nodes you drop in to convert a normal workflow into a distributed one (the other being Distributed Collector). Genuinely two nodes - the pack's headline claim of "convert any workflow to distributed with 2 nodes" runs through this one.

    How it works

    Here's the mechanism, and it's worth getting straight because the whole pack rests on it. ComfyUI-Distributed does not pool VRAM or split one image across cards. It runs the entire workflow, whole, on each participating GPU at the same time. The master and every worker execute the same graph in parallel. The only thing that must differ between them is the seed - otherwise you'd get copies.

    Distributed Seed handles exactly that. You set a base seed on the node; at execution the master keeps it, and each worker derives a distinct seed of its own. So the sampler on GPU 0 and the sampler on GPU 1 start from different noise, and you collect a batch of distinct outputs at the end. The community shorthand for what this buys you: instead of one image in half the time, you get two images in the time it used to take for one.

    The input and output

    There's exactly one of each, which is refreshing.

    • seed (INT, default 1125899906842) - the base seed. Treat it like any KSampler seed: fix it for reproducibility, randomize it for variety. Whatever value lands here, the workers offset from it so no two participants collide.

    The output is a single seed (INT). You wire it into your sampler's seed input in place of whatever number widget was there. That's the entire integration on the seed side - unplug the sampler's own seed, plug this in.

    Because it outputs a plain INT, it's not fussy about where it goes. Any node that takes a seed will accept it - KSampler, SamplerCustom, a Wan video sampler, whatever your workflow uses.

    Installing it

    It ships in the ComfyUI-Distributed pack, so you install the pack once and get all eight nodes. In ComfyUI Manager, search ComfyUI-Distributed, install, and restart. Or by hand: cd ComfyUI/custom_nodes && git clone https://github.com/robertvoy/ComfyUI-Distributed.git, then restart ComfyUI. No models to download, no exotic Python packages - the only real requirement is having more than one GPU (or cloud workers) for it to mean anything. If you'll be adding remote or cloud workers, add --enable-cors-header to the master's launch arguments so the browser will talk to them.

    Where people get burned

    • Nothing changes with one GPU. On a single card with no workers enabled, Distributed Seed just passes a seed through and you gain nothing. The point is parallel workers; this node only earns its keep once they're enabled in the Distributed panel.
    • Forgetting to actually swap the wire. The node does nothing if your sampler is still reading its own built-in seed widget. Route this node's output into the sampler's seed input, or every worker quietly runs whatever number was already sitting there.
    • Expecting a single image faster. This makes you more images at once; it does not make one image finish quicker. That's a property of the whole pack, and it's the FAQ answer people most often miss - for single-image speedup you want the distributed upscale node instead.
    • Reproducibility across a mixed fleet. The base seed is reproducible, but which worker got which derived seed depends on which workers were enabled at run time. Change the set of active workers and the per-image seeds shuffle - fine for exploration, something to pin down if you need an exact rerun.
    Categoryutils

    Inputs (1)

    NameTypeDefaultDescription
    seedINT11258999068420–1125899906842624

    Outputs (1)

    NameTypeDescription
    seedINT