Inject Latent Noise Masked (Badman)
Add noise to a latent, region by region
- latent
- mask
- LATENT
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- theLATENTyou're injecting noise into.mask- theMASKcontrolling 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,-20to20, default1) - notably wide, and notably signed. The negative half of that range isn't just "less noise" (which0already 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, defaultfalse) - whether the injected noise gets normalized before being applied.blend_mode(enum,replace/add/multiply, defaultreplace) - how the new noise combines with whatever's already in the latent at each masked position.replaceoverwrites,addlayers on top,multiplyscales.invert_mask(enum,false/true, defaultfalse) - 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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | — | |
| mask | MASK | — | |
| noise_seed | INT | 00–18446744073709550000 | — |
| noise_strength | FLOAT | 1.00-20–20 | — |
| normalize | COMBO | false | 2 options: false, true |
| blend_mode | COMBO | replace | 3 options: replace, add, multiply |
| invert_mask | COMBO | false | 2 options: false, true |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |