Nodes/ComfyUI_yanc/😼> NIKSampler
ComfyUI Node

😼> NIKSampler

A KSampler with a second noise source stitched into it

By ALatentPlaceΒ·Created 2 years agoΒ·Updated 2 years agoΒ· 80
😼> NIKSampler
  • model
  • positive
  • negative
  • latent_image
  • latent_noise
  • mask
  • LATENT
β—„seed0β–Ί
β—„steps30β–Ί
β—„cfg8.0β–Ί
β—„cfg_noise8.0β–Ί
β—„sampler_nameβ–Ύβ–Ί
β—„schedulerβ–Ύβ–Ί
β—„noise_strength0.5β–Ί

This is the node the whole pack is quietly built around. It gets its own top-level category in the node menu ("Noise Injection Sampler"), its own dedicated tutorial video from the author, and - going by the one support thread I found on it - enough moving parts that people do run into trouble wiring it up. It's a KSampler that can blend in an extra, separate noise source mid-generation, on top of the usual denoise process.

How it works

Strip away the extras and it's a normal KSampler: model, positive, negative, latent_image, seed, steps, sampler_name and scheduler all work exactly like the vanilla node, with the same sampler and scheduler lists you already know. What's new is a second CFG value, cfg_noise, applied specifically to the injected-noise pass rather than the main denoise, and noise_strength, which controls how much of that extra noise blends into your latent versus how much of the normal sampling process you keep. The actual injected noise comes in through the optional latent_noise input - normally fed by this pack's companion Noise From Image node - and there's an optional mask to confine the injection to part of the frame instead of the whole image.

The practical effect people reach for this for is texture and grain character that plain sampling doesn't give you - baked-in film grain, extra skin or fabric texture, something to break up the overly-smooth look diffusion models default to.

The inputs and outputs that matter

  • model, positive, negative, latent_image, seed, steps, cfg, sampler_name, scheduler - the standard KSampler set.
  • cfg_noise (FLOAT, default 8) - a separate CFG value for the noise-injection pass.
  • noise_strength (FLOAT, 0.1–1, default 0.5) - how strongly the injected noise blends in.
  • latent_noise (LATENT, optional) - the actual noise to inject, typically from Noise From Image. Leave it unconnected and NIKSampler behaves like a KSampler with unused extra knobs.
  • mask (MASK, optional) - confines the injection to a region.
  • LATENT out - same as any sampler, wire it to VAE Decode.

How to install it

Via ComfyUI Manager: search "yanc" or "ComfyUI_yanc" and install, then restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ALatentPlace/ComfyUI_yanc

then restart ComfyUI, and keep it up to date - the README specifically flags this as important for the pack in general. No extra dependencies, and no model download beyond your regular checkpoint; the "noise" part is generated in-graph, not loaded from a file.

Build it up in stages rather than all at once: get NIKSampler sampling correctly with latent_noise left unconnected first, confirm it behaves like a normal KSampler, then add Noise From Image and wire it in. Debugging a new sampler and a new noise source at the same time is harder than debugging them one at a time.

Common issues & troubleshooting

'NoneType' object has no attribute 'clone' when latent_noise is connected. This is a real error people hit, and the fix is upstream: the Noise From Image node needs its vae_opt input connected whenever it's producing a latent rather than working directly from an image. Without that, latent_noise arrives empty and NIKSampler crashes trying to work with it.

Results look identical to a plain KSampler. Check two things: that latent_noise is actually connected to something (an unconnected optional input means no injection happens at all), and that noise_strength isn't sitting too low to see an effect.

A specific sampler/scheduler combo behaves oddly. The lists are the same ones ComfyUI's own KSampler uses, so a combo that's flaky in a normal KSampler will likely be just as flaky here - it's probably not NIKSampler-specific.

You want the effect on just part of the image. Wire a mask into the optional mask input - this pack's own Light Source Mask, or any subject mask, works fine - rather than letting the injection apply across the whole frame.

CategoryYANC/😼 Noise Injection Sampler

Inputs (13)

NameTypeDefaultDescription
modelMODELβ€”
seedINT00–18446744073709550000β€”
stepsINT301–10000β€”
cfgFLOAT8.00–100β€”
cfg_noiseFLOAT8.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β€”
noise_strengthFLOAT0.50.1–1β€”
latent_noiseoptLATENTβ€”
maskoptMASKβ€”

Outputs (1)

NameTypeDescription
LATENTLATENTβ€”