Nodes/ComfyUI-BadmanNodes/Inject Latent Noise Masked (Badman)
ComfyUI Node

Inject Latent Noise Masked (Badman)

Add noise to a latent, region by region

By MariusKM·Created 2 years ago·Updated 3 months ago· 4
Inject Latent Noise Masked (Badman)
  • latent
  • mask
  • LATENT
noise_seed0
noise_strength1.00
normalizefalse
blend_modereplace
invert_maskfalse

Most of the time noise in a diffusion graph is something a sampler manages for you, applied uniformly. This node hands you direct, manual control over where noise gets added to a latent and how much - masked, so you can push noise into one region while leaving the rest of the image untouched.

Where this actually gets used

The mechanism: high values in your mask get more noise injected, low values get less, per the pack's own description. That's a genuinely useful primitive for a few real workflows - re-noising a specific region between two sampler passes so an inpaint-style area gets fresh variation while the rest of the latent stays stable, deliberately breaking up an area that's come out too smooth or too repetitive by hand-injecting controlled noise into just that spot, or building creative effects where noise level itself is the tool (a masked "static" or grain effect applied selectively rather than globally). It sits a level below the sampler's own noise handling - you're reaching in and modifying the latent directly, which means you're also responsible for what happens to it next (typically another sampling pass to actually resolve that injected noise into image detail).

Inputs and outputs

Required fields:

  • latent - the LATENT you're injecting noise into.
  • mask - the MASK controlling where and how much noise gets added.
  • noise_seed (integer, up to the standard 64-bit max) - its own independent seed, separate from your sampler's noise seed, so you can lock or vary the injected noise pattern without touching the rest of your generation's randomness.
  • noise_strength (float, -20 to 20, default 1) - notably wide, and notably signed. The negative half of that range isn't just "less noise" (which 0 already covers) - it implies the node can subtract or invert noise's effect rather than only adding it, though the schema doesn't spell out the exact math past that, so treat strongly negative values as an experimental territory to explore on a test image rather than a documented, predictable behavior.
  • normalize (enum, false/true, default false) - whether the injected noise gets normalized before being applied.
  • blend_mode (enum, replace / add / multiply, default replace) - how the new noise combines with whatever's already in the latent at each masked position. replace overwrites, add layers on top, multiply scales.
  • invert_mask (enum, false/true, default false) - flips which regions count as "high mask value" without needing a separate mask-invert node in the chain.

One output: the modified LATENT.

Installing it

ComfyUI Manager: search ComfyUI-BadmanNodes, install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/MariusKM/ComfyUI-BadmanNodes. No dependencies or downloads called out - it's latent-tensor manipulation, no models involved.

Where people get burned

The biggest one: this node injects noise, it doesn't resolve it into image detail on its own - you need a sampling pass after this to actually turn the injected noise into visible content, or the noise just sits in the latent as noise. If your workflow stops right after this node and the output looks unchanged or just noisy rather than usefully varied, that missing downstream sampler is almost certainly why. Second, blend_mode and noise_strength interact in ways worth testing rather than assuming - multiply at a strength far from 1 can swing from barely-there to extreme very quickly, since you're scaling existing latent values rather than adding a fixed amount. And because noise_seed is fully independent of your main generation seed, a workflow that looks non-deterministic between runs might just have this seed set to something that changes, not your actual sampler seed - check both if reproducibility matters to you.

CategoryBadman

Inputs (7)

NameTypeDefaultDescription
latentLATENT
maskMASK
noise_seedINT00–18446744073709550000
noise_strengthFLOAT1.00-20–20
normalizeCOMBOfalse2 options: false, true
blend_modeCOMBOreplace3 options: replace, add, multiply
invert_maskCOMBOfalse2 options: false, true

Outputs (1)

NameTypeDescription
LATENTLATENT