Nodes/ComfyUI Inspire Pack/KSamplerAdvanced (inspire)
ComfyUI Node Runs on cloud

KSamplerAdvanced (inspire)

The advanced sampler with A1111 noise and variation seeds

By ltdrdata·Created 3 years ago·Updated 9 months ago· 805
KSamplerAdvanced (inspire)
  • model
  • positive
  • negative
  • latent_image
  • noise_opt
  • scheduler_func_opt
  • LATENT
add_noisetrue
noise_seed0
steps20
cfg8.0
sampler_name
scheduler
start_at_step0
end_at_step10000
noise_mode
return_with_leftover_noisefalse
batch_seed_mode
variation_seed0
variation_strength0.00
variation_method
internal_seed0

This is ComfyUI's KSampler (Advanced) with two extra tricks bolted on: it can generate noise the way A1111 does, and it can do variation seeds. If you've ever tried to reproduce an A1111 image in ComfyUI and gotten something close but not it, this node exists for exactly that frustration. And if you love a seed but wish you could nudge it slightly instead of rerolling into something totally different, the variation seed is the tool.

Everything a normal advanced sampler does - step ranges, add-noise control, leftover-noise handoff for multi-stage sampling - is here too. It's a drop-in upgrade to KSampler (Advanced) that adds capability without taking anything away.

Why A1111 results don't match, and what this fixes

The knowledge base has the clean version of this: ComfyUI generates its random noise on the CPU, while A1111 generates it on the GPU. Same seed, different noise, different image. That's one of the main reasons a ported prompt doesn't reproduce. This node lets you switch noise generation to GPU mode to line up with A1111. (It's not the only factor - A1111 also weights prompt emphasis differently, which needs an advanced CLIP text encode to match - but noise is the big one and this is the fix for it.)

It's from Dr.Lt.Data, the ComfyUI-Manager and Impact Pack author, so this isn't some sketchy compatibility hack - it's the maintained way to do it.

The inputs and outputs that matter

Beyond the usual model, positive, negative, latent_image, steps, cfg, sampler_name, scheduler, the ones worth knowing:

  • noise_mode - GPU(=A1111) to match A1111, or CPU for ComfyUI's default. The single most important setting if reproduction is your goal.
  • batch_seed_mode - how seeds map across a batch. comfy noises the whole batch at once (avoids accidental duplicate images); incremental bumps the seed per image the A1111 way, which is easier for straightforward seed-based reproduction; the variation str inc options ramp variation across the batch.
  • variation_seed + variation_strength - the good part. Keep your main noise_seed, then blend in a second seed's noise by variation_strength (0 = pure original seed, 1.0 = fully the variation seed). Small values give you "the same image, but slightly." Great for exploring around a composition you like without losing it. The optional variation_method (linear or slerp) controls how the two noises blend.
  • start_at_step / end_at_step / add_noise / return_with_leftover_noise - the standard advanced-sampler controls for splitting sampling across multiple nodes (e.g. base pass then refiner pass).

The single output is LATENT - decode it with a VAE like any other sampler's output.

How to install it

ComfyUI Manager: search ComfyUI Inspire Pack, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Inspire-Pack

then restart.

Common issues & troubleshooting

Still doesn't match A1111 exactly. Noise mode gets you most of the way, but not all. Per the pack's own notes, two other things bite: prompt weighting is interpreted differently (you need BlenderNeko's Advanced CLIP Text Encode to align it), and embeddings must be written with the embedding: prefix. Match all three and results converge.

Variation seed does nothing. Check variation_strength - at 0 it's pure original seed, so nothing changes. Start around 0.05–0.2 for subtle shifts.

Batch images come out identical or weirdly patterned. That's batch_seed_mode. Use comfy to avoid duplicate-seed collisions across a batch; use incremental when you specifically want reproducible per-image seeds. If you're getting a strange gradient of variation, one of the variation str inc modes is selected.

Multi-stage handoff produces mush. When chaining two of these (base → refiner), the first needs return_with_leftover_noise on and the second needs add_noise off, with matching step ranges. Mismatched here is the classic cause of a garbled second pass.

CategoryInspirePack/a1111_compat

Inputs (21)

NameTypeDefaultDescription
modelMODEL
add_noiseBOOLEANtrue
noise_seedINT00–18446744073709550000This is the seed for the initial noise applied to the latent.
stepsINT201–10000
cfgFLOAT8.00–100
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO17 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +11
positiveCONDITIONING
negativeCONDITIONING
latent_imageLATENT
start_at_stepINT00–10000
end_at_stepINT100000–10000
noise_modeCOMBO4 options: GPU(=A1111), CPU, GPU+internal_seed, CPU+internal_seed
return_with_leftover_noiseBOOLEANfalse
batch_seed_modeCOMBO4 options: incremental, comfy, variation str inc:0.01, variation str inc:0.05
variation_seedINT00–18446744073709550000
variation_strengthFLOAT0.000–1
variation_methodoptCOMBO2 options: linear, slerp
noise_optoptNOISE_IMAGE
scheduler_func_optoptSCHEDULER_FUNC
internal_seedoptINT00–18446744073709550000This is the seed used for generating noise in intermediate steps when using ancestral and SDE-based samplers. NOTE: If `noise_mode` is in GPU mode and `internal_seed` is the same as `seed`, the generated image may be distorted.

Outputs (1)

NameTypeDescription
LATENTLATENT