KSampler Seed Variator π²
One KSampler, a handful of seeds, zero duplicate nodes
- model
- positive
- negative
- latent_image
- latent_batch
- seeds_used
- summary
You know the ritual. You get a great prompt, hit queue, and the seed lottery spits out something forgettable. So you wire up five KSampler nodes in parallel - same prompt, same settings, five seeds - and squint at the results to find the lucky one. The KSampler Seed Variator from TensorVizion/OmniNodes collapses that whole wall of duplicate nodes into a single one.
Instead of making you copy the sampler five times, it runs the same prompt and settings across num_variations consecutive seeds internally - base_seed, base_seed+1, base_seed+2, and so on - and hands you one batched latent containing every variation. It's a thin orchestration layer, not a reimplementation: each variation is a real call into ComfyUI's own core KSampler (via getattr(instance, instance.FUNCTION), the pack's standard trick to stay correct if core renames an internal method), so the sampling math is identical to what you'd get from stock nodes.
The inputs that matter
Most of the socket list is a standard KSampler's - model, positive, negative, steps, cfg, sampler_name, scheduler, denoise all behave exactly as you'd expect. Two are the reason this node exists:
base_seed- the starting point. Variations are consecutive integers from here, so this is the seed you actually record to reproduce a batch.num_variations(default 4, max 64) - how many samples to run. Sixteen variations is a nice "pick the winner" sweep; you'll feel each one in queue time, since they run back-to-back.
One gotcha the author is upfront about: latent_image must be a single-image (batch-1) latent, like a fresh EmptyLatentImage. Feed it a pre-batched latent and the internals slice it down to one anyway, which is probably not what you meant.
What comes out
Three outputs: latent_batch (one LATENT with all variations stacked), seeds_used (a comma-separated string, handy for logging or a notes node), and a summary string spelling out exactly what ran - sampler, scheduler, steps, CFG, and the output batch shape. Wire latent_batch into a VAE Decode and you get one tall image batch of every variation. That's where the pattern shines: a Contact Sheet Maker or an Image Grid Compare downstream turns the whole lottery into a single labeled grid you can browse in one go.
Install
The node ships in OmniNodes, so it comes with the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/TensorVizion/OmniNodes
Or search OmniNodes in ComfyUI Manager and install from there. Restart ComfyUI and it appears under TensorVizion/Sampling. No extra pip installs - this node runs on PyTorch alone, which any ComfyUI already has.
Troubleshooting
- Node missing from the menu - check the ComfyUI terminal for
[OmniNodes]lines.β Error importingmeans a real failure with a traceback; the pack's per-file loader logs each file as it loads, so you'll see where it choked. - Variations look identical - you're not broken; that's the seed lottery telling you your prompt is very stable at this CFG. Or you set
denoiselow, in which case every variation starts from the same structure and barely diverges. That's img2img behavior, not a bug. - Batch too big - the combined latent grows linearly with
num_variations, and decoding it all at once can eat VRAM. Dial back the count before decoding.
The one thing to remember: control_after_generate doesn't apply here the way you'd hope - the node owns its seed handling and steps seeds itself. That's actually the point. Set base_seed once, and seeds_used tells you exactly which numbers produced your batch.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | β | |
| positive | CONDITIONING | β | |
| negative | CONDITIONING | β | |
| latent_image | LATENT | β | |
| base_seed | INT | 00β18446744073709550000 | β |
| num_variations | INT | 41β64 | β |
| steps | INT | 201β10000 | β |
| cfg | FLOAT | 7.00β100 | β |
| sampler_name | STRING | dpmpp_2m | β |
| scheduler | STRING | karras | β |
| denoise | FLOAT | 1.000β1 | β |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| latent_batch | LATENT | β |
| seeds_used | STRING | β |
| summary | STRING | β |