ComfyUI Node

Inject Noise

Inject noise into model layers, DRUGS-style

By 54rt1n·Created 3 years ago·Updated about a year ago· 98
Inject Noise
  • model
  • model_mask
  • MODEL
operationgaussian
ratio0.98
mean0.05
std0.01
seed1
layers*.to_v*
methodcomfy

Inject Noise is the fun one. The README calls noise injection "a really fun tool," and it's the node the author points new people at after the merge machinery - because it does the opposite of merging. Instead of blending two checkpoints, it takes one model and adds noise directly into chosen layers of its weights. No second model needed, no gradient, no mask required (though you can bring one).

The mechanism is straight out of the DRUGS project the README links: pick layers, generate noise, add it to the weights. The default target is *.to_v* - the value projection matrices of the attention layers - because that's a well-known spot where small perturbations change image character without wrecking the whole model. If you've ever seen a "style hack" that involves nudging V projections, this is that idea, parameterized.

The inputs that matter

  • model - the checkpoint you're messing with.
  • operation - random (uniform noise) or gaussian (default). Gaussian with a small std is the gentler, more predictable choice for a first try.
  • ratio (default 0.98) - the mix between the original weight and the noised version. High ratio = mostly noise, original barely there; lower toward 0 keeps most of the original. 0.98 is aggressive - start lower if the output looks like static.
  • mean and std - the gaussian parameters. Defaults 0.05 and 0.01.
  • seed - fixed it, or the noised model changes every run.
  • layers (default *.to_v*) - the wildcard pattern for which layers get noise, same targeting language as Mask Edit and Gradient Edit (comma/newline separated, * wildcards, {0,1} expansions). This is the main dial: *.to_v* targets all value projections; * would hit everything.
  • method - the usual 12-way merge dropdown, comfy default.
  • model_mask (optional) - restrict the noise to masked parameters only. Pair it with Magnitude Masker to perturb only the low-magnitude params of a layer, or with a random mask to scramble a slice of the weights.

The output

A MODEL with the noise baked in as a patch. Wire it to a KSampler to see the result, or into Save Checkpoint if you actually want to keep the mutant. Since it's a patch, you can also chain this node after a merge - noised merge output is a real direction people poke at.

Install and gotchas

ComfyUI Manager (search "DareMerge") or:

cd ComfyUI/custom_nodes
git clone https://github.com/54rt1n/ComfyUI-DareMerge

Restart ComfyUI. Dependencies: matplotlib, numpy, torch, pillow, no downloads.

The honest framing: this is a toy, in the best sense. It's great for making weird one-off style variants and for learning which layers do what (noise to_v and watch the texture change; noise to_q and watch composition wobble), but it's not a recipe node - nobody has published a reliable "add this noise, get this style" table for it. Start with a low ratio on a throwaway model, keep the seed fixed while you dial in, and remember the defaults are tuned for "noticeable effect," not "stable output." If your result looks like television static, ratio too high, layer set too broad, or both.

CategoryDareMerge/util

Inputs (9)

NameTypeDefaultDescription
modelMODEL
operationCOMBOgaussian2 options: random, gaussian
ratioFLOAT0.980–1
meanFLOAT0.050–1
stdFLOAT0.010–1
seedINT10–99999999999
layersSTRING*.to_v*
methodCOMBOcomfy12 options: comfy, lerp, slerp, slice, cyclic, gradient, +6
model_maskoptMODEL_MASK

Outputs (1)

NameTypeDescription
MODELMODEL