Nodes/cg-noise/KSampler Advanced with Variations
ComfyUI Node

KSampler Advanced with Variations

Variations for your two-pass and refiner workflows

By chrisgoringe·Created 3 years ago·Updated 2 years ago· 26
KSampler Advanced with Variations
  • model
  • positive
  • negative
  • latent_image
  • LATENT
add_noise
noise_seed0
variation_seed42
variation_weight0.200
steps20
cfg8.0
sampler_name
scheduler
start_at_step0
end_at_step10000
return_with_leftover_noise

KSampler Advanced is what you reach for when you need control over when noise enters and leaves the image: add_noise, start_at_step, end_at_step, return_with_leftover_noise. KSampler Advanced with Variations is that same node with the variation pair bolted on. If you already know cg-noise's basic variant, you know this one; the difference is all the Advanced plumbing underneath.

The mechanism is identical. The node swaps Comfy's internal noise function so the initial noise becomes

noise = noise(noise_seed) * (1 - w) + noise(variation_seed) * w

Two new inputs appear right after noise_seed:

  • variation_seed (default 42) - the alternate noise source
  • variation_weight (default 0.2, range 0–1, step 0.001) - how much of it gets mixed in. Start around 0.1; 0.2 is punchier than the default value makes it look.

Everything else is stock KSampler Advanced: model, add_noise, noise_seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, start_at_step, end_at_step, return_with_leftover_noise. Output is a single LATENT, wired to VAE Decode or into the next pass like any sampler.

When do you actually need the Advanced version? When your workflow splits sampling across two passes - a hires-fix chain, an inpaint pass, an SDXL base → refiner split. The advanced knobs exist to sequence those passes, and the variation inputs ride along on the first one.

The gotcha that trips everyone: the variation only lives in the added noise. The moment add_noise is set to disable - which is exactly how you configure a second pass - the variation stops doing anything. So this node belongs on the first pass, the one that generates noise, and the plain KSampler Advanced handles the follow-up. Same rule as the basic node's refiner note: noise is added once, and that's where the variations live.

Batch behavior is inherited too, quirks and all. A batch of N yields weights 0×, 1×, 2×… per image, and some samplers do unexpected things with batches. If you're mass-testing variations and the output looks unrelated, switch samplers before concluding it's broken. Also note the pack locks the seed widgets to fixed so the variation axis stays stable while you tune variation_weight.

Install is the same as every node in this pack. ComfyUI Manager → search "cg-noise" or "chrisgoringe" → install → restart → hard refresh. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/chrisgoringe/cg-noise.git

Then restart ComfyUI. No models, no requirements.txt, no extra dependencies - it's a thin Python wrapper around Comfy's built-in KSamplerAdvanced. (The README mentions a cg-custom-core clone for manual installs; the current v1.3 code doesn't use it.)

The README's retirement note applies here with extra force. The pack was retired in 2024 when Comfy made noise a first-class datatype; the author rebuilt the whole idea in cg-noisetools (Noise Mix, Noise Shape) and that's the maintained path. Old workflows on this node keep working - they just don't get updated.

Categorysampling

Inputs (15)

NameTypeDefaultDescription
modelMODEL
add_noiseCOMBO2 options: enable, disable
noise_seedINT00–18446744073709550000
variation_seedINT420–18446744073709550000
variation_weightFLOAT0.2000–1
stepsINT201–10000
cfgFLOAT8.00–100
sampler_nameCOMBO34 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +28
schedulerCOMBO9 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +3
positiveCONDITIONING
negativeCONDITIONING
latent_imageLATENT
start_at_stepINT00–10000
end_at_stepINT100000–10000
return_with_leftover_noiseCOMBO2 options: disable, enable

Outputs (1)

NameTypeDescription
LATENTLATENT