KSampler with Variations
Liked the image, want a variation without rerolling everything
- model
- positive
- negative
- latent_image
- LATENT
You've been there: you nail a prompt, lock a seed, and the image is almost right. So you bump the seed by one and - poof - different pose, different lighting, everything rearranged. That's the seed lottery, and KSampler with Variations exists to stop you playing it. Instead of rerolling the whole latent, it keeps your original noise and blends in a controlled amount of noise from a second seed. Small weight in, small change out. The composition survives; the details wander.
It's a drop-in replacement for ComfyUI's built-in KSampler: same inputs, same output, plus two new ones. Swap it in place of a plain KSampler and you get variation_seed and variation_weight sitting right next to the regular seed.
The one trick. The whole pack works by replacing Comfy's internal noise function so that
noise = noise(seed) * (1 - w) + noise(variation_seed) * w
Weight 0 gives you a pixel-identical image to a normal KSampler. Tiny weights like 0.05–0.1 give subtly different framing, expression, or texture. It's the same idea as Automatic1111's variation seed/strength feature - the author built this pack as an explicit homage to it.
The inputs that matter, beyond the standard KSampler list:
seed- the seed of your "original" imagevariation_seed(default 42) - the alternate seed you're blending towardvariation_weight(default 0.2, range 0–1, step 0.001) - how much alternate noise sneaks in. The author suggests trying 0.1, and honestly that's the right starting point; 0.2 default is more aggressive than it sounds.
Everything else is stock KSampler: steps, cfg, sampler_name, scheduler, positive, negative, latent_image, and denoise for img2img. Output is one LATENT - wire it to VAE Decode exactly like you would any sampler.
Where people get burned:
- The variation lives in the initial noise, so it only matters on the pass that adds noise. In an SDXL base + refiner setup, the variations belong on the base sampler. Attach this to the refiner (where
add_noiseis off) and it does nothing - the README calls this out explicitly. - Batch mode doesn't do what you'd guess. Feed it a batch of 4 and the images get weights 0×, 1×, 2×, 3× - the first is the original, the rest ramp up. And some samplers don't honor batches the way you expect; if a batch comes out looking unrelated, try a different sampler before you assume it's broken.
- Different sampler/scheduler combos render the same weight differently. 0.1 can be "subtle" on DPM++ 2M and "whoa" on Euler A. Tune per combo.
- The seed widgets are locked to
fixedby default (via the pack's JS) so nothing randomizes while you hunt. That's deliberate.
Installation is trivial. ComfyUI Manager → search "cg-noise" or "chrisgoringe" → install → restart ComfyUI → hard-refresh the browser. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/chrisgoringe/cg-noise.git
Then restart. No models to download, no requirements.txt, no heavy dependencies - the pack is pure Python on top of Comfy's own internals plus one tiny JS file. (The README's manual-install section mentions cloning cg-custom-core too; the current code doesn't import it, so ignore that line.)
Fair warning from the README itself: the author retired this pack in 2024. Once Comfy elevated noise to a proper datatype, he rewrote the whole concept as cg-noisetools - its Noise Mix node does this more cleanly without monkey-patching. If you're building new workflows, that's the better home. But existing workflows keep working; this is a "still functions, just not maintained" situation.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | The model used for denoising the input latent. | |
| seed | INT | 00–18446744073709550000 | The random seed used for creating the noise. |
| variation_seed | INT | 420–18446744073709550000 | — |
| variation_weight | FLOAT | 0.2000–1 | — |
| steps | INT | 201–10000 | The number of steps used in the denoising process. |
| cfg | FLOAT | 8.00–100 | The Classifier-Free Guidance scale balances creativity and adherence to the prompt. Higher values result in images more closely matching the prompt however too high values will negatively impact quality. |
| sampler_name | COMBO | The algorithm used when sampling, this can affect the quality, speed, and style of the generated output. | |
| scheduler | COMBO | The scheduler controls how noise is gradually removed to form the image. | |
| positive | CONDITIONING | The conditioning describing the attributes you want to include in the image. | |
| negative | CONDITIONING | The conditioning describing the attributes you want to exclude from the image. | |
| latent_image | LATENT | The latent image to denoise. | |
| denoise | FLOAT | 1.000–1 | The amount of denoising applied, lower values will maintain the structure of the initial image allowing for image to image sampling. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | The denoised latent. |