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

KSampler (inspire)

GPU noise and A1111-style seeds for closer reproduction

By ltdrdata·Created 3 years ago·Updated 9 months ago· 805
KSampler (inspire)
  • model
  • positive
  • negative
  • latent_image
  • scheduler_func_opt
  • LATENT
seed0
steps20
cfg8.00
sampler_name
scheduler
denoise1.00
noise_mode
batch_seed_mode
variation_seed0
variation_strength0.00
variation_method
internal_seed0

This is a drop-in replacement for the standard KSampler with one headline trick: it can generate its initial noise on the GPU, the way A1111 does. ComfyUI normally makes noise on the CPU, and that single difference is one of the main reasons the same prompt, seed, and settings give you a different image in ComfyUI than in A1111. Set this node's noise_mode to GPU(=A1111) and you knock out one of the three big blockers to reproducing an A1111 result.

You don't have to care about A1111 to want it, though. It also bundles A1111-style seed handling and a variation-seed system that the vanilla KSampler doesn't have, which makes it a nice sampler for exploring around a seed you like.

How it works

Everything a normal KSampler does - take model, positive, negative, latent_image, run steps at a cfg with your sampler_name/scheduler, output a LATENT - plus control over where the noise comes from and how seeds map across a batch. The noise_mode picks CPU vs GPU generation. The batch_seed_mode decides how a batch gets its seeds: comfy applies noise to the whole batch at once (avoids accidental duplicate images), while incremental bumps the seed per image like A1111 does, which is easier to reproduce one-by-one.

The variation controls are the other reason to reach for it: variation_seed and variation_strength blend a second seed into the first. At strength 0 you get the pure seed; nudge it up and you keep the overall composition but introduce small changes - perfect for "this is close, give me ten near-misses."

The inputs and outputs that matter

  • noise_mode - GPU(=A1111) to match A1111's noise; CPU for ComfyUI-default behaviour.
  • batch_seed_mode - comfy (batch at once) vs incremental (A1111-style per-image seeds).
  • variation_seed / variation_strength - hold a composition and explore small variations around it.
  • The usual steps / cfg / sampler_name / scheduler / denoise work exactly as on a stock KSampler.

Output: LATENT - into a VAE Decode like any sampler.

Installing it

ComfyUI Manager: search "Inspire Pack", install, restart. Or manually:

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

Then restart. No extra packs required for this node itself.

Where people get tripped up

Don't expect GPU noise to pixel-match A1111 on its own - the README is clear that it's only one of three factors. To get genuinely close you also need to prefix embeddings with embedding: in the prompt, and use BlenderNeko's Advanced CLIP Text Encode so the prompt weighting is interpreted the same way, because ComfyUI and A1111 read weights differently. Fix the noise here, fix the other two there, and the results converge; fix only this and you'll still see differences and wonder why. If you're not chasing A1111 at all, the honest take is that the plain KSampler is fine - grab this one for the variation_seed exploration or the batch-seed control, which are the parts that earn their keep regardless.

CategoryInspirePack/a1111_compat

Inputs (17)

NameTypeDefaultDescription
modelMODEL
seedINT00–18446744073709550000This is the seed for the initial noise applied to the latent.
stepsINT201–10000
cfgFLOAT8.000–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
denoiseFLOAT1.000–1
noise_modeCOMBO4 options: GPU(=A1111), CPU, GPU+internal_seed, CPU+internal_seed
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
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