π§ KSampler Stochastic Variations
KSampler Stochastic Variations β nudge a seed you like without losing it
- model
- latent_image
- positive
- negative
- variation_seed
- LATENT
You've got a seed you love. The composition's right, the pose is right, but you want to see the neighbors - the same image, slightly different - without rolling a fresh seed and losing everything. That's what this sampler is for. It's a KSampler with a second seed bolted on that blends a controlled amount of variation noise into your main seed, so you explore around a result instead of jumping to a random new one.
If you used Automatic1111, this is the "variation seed / variation strength" idea, ported into a ComfyUI sampler node.
How it works
A normal KSampler starts from noise defined by one seed. This node starts from your noise_seed, then mixes in a second noise pattern from variation_seed, weighted by variation_strength. At strength 0 you get your original image exactly. Crank strength toward 1 and the variation seed takes over, drifting further from the original. The sweet spot is small - a strength of 0.1 to 0.3 gives you recognisable siblings of your image rather than strangers.
So the workflow is: lock noise_seed to the image you like, then sweep variation_seed (1, 2, 3β¦) at a fixed small variation_strength to generate a family of near-variations. Or hold the variation seed and slowly raise strength to watch one image morph away from the original.
The inputs that matter
It takes the usual sampler wiring - model, positive, negative, latent_image, plus steps, cfg, sampler, and scheduler (the full core lists: 44 samplers, 9 schedulers). On top of that:
- noise_seed - your anchor. The base image.
- variation_seed - the second seed. Change this to get different neighbors.
- variation_strength - how far to wander (0β1, default 0.2). This is the dial you'll actually tune.
- cfg_scale - a 0β1 factor (default 1) that scales the guidance behavior for this stochastic path. Leave it at 1 unless you're deliberately experimenting.
Output is a LATENT, same as any sampler - send it to a VAE Decode.
When you'd reach for it
Refinement and selection. You've done a big batch, one result stands out, and you want a handful of close alternatives to pick the best from - this beats re-rolling because every variation shares the winner's DNA. It's also nice for subtle "same character, slightly different expression" nudges where a whole new seed would give you a whole new person.
For everyday generation it's overkill; use a plain KSampler. Reach for this specifically when you're circling a result you already like.
Installing it
Ships in ComfyUI Essentials by cubiq (Matteo Spinelli, author of ComfyUI_IPAdapter_plus):
- ComfyUI Manager: search "ComfyUI Essentials" β Install β restart.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/cubiq/ComfyUI_essentials, installrequirements.txt, restart.
Gotchas
Strength is touchy - the useful range is the bottom fifth of the slider. If your "variations" look like completely unrelated images, you've set strength too high; it's behaving like a fresh seed, which defeats the purpose. Drop it back under 0.3.
Remember the base image only stays put if noise_seed stays put. If you change both seeds you're not making variations, you're making random images.
Pack note: cubiq set Essentials to maintenance-only in April 2025. It still works, but this is a more complex node than most in the pack, so it's a likelier candidate to snag on a big ComfyUI sampler-side update. If it errors after an update, roll ComfyUI back or patch the file - nothing's coming from upstream. A red "missing node" box means the pack didn't load at all; check the startup log and reinstall via Manager.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | β | |
| latent_image | LATENT | β | |
| noise_seed | INT | 00β18446744073709550000 | β |
| steps | INT | 251β10000 | β |
| cfg | FLOAT | 7.00β100 | β |
| sampler | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| positive | CONDITIONING | β | |
| negative | CONDITIONING | β | |
| variation_seed | INT:seed | 00β18446744073709550000 | β |
| variation_strength | FLOAT | 0.200β1 | β |
| cfg_scale | FLOAT | 1.000β1 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | β |