Nodes/Tensor Prism/Noise Injection Merge (Tensor Prism)
ComfyUI Node

Noise Injection Merge (Tensor Prism)

Adding controlled chaos to escape the merge rut

By Arctenox·Created 12 months ago·Updated 6 months ago· 2
Noise Injection Merge (Tensor Prism)
  • model_A
  • model_B
  • merged_model
merge_ratio0.50
noise_strength0.050
noise_patterngaussian
seed42
layer_scaling_factor1.5
adaptive_threshold0.30
noise_decay0.90
perlin_frequency2.0
focus_attentiontrue
focus_mlpfalse
preserve_normstrue

Here's a truth about merges nobody likes to say: averaging two similar models usually produces a third model that's less than both. The convergence problem is baked into the math - the middle of weight space is a featureless plateau. Noise Injection Merge (Tensor Prism) is the pack's attempt to fix that by doing something slightly heretical: adding a controlled dose of noise to the merged weights to knock the result off that plateau.

It's the newest and most explicitly experimental node in the pack (added in 1.7.0), and the README frames it as a way to "escape local optima and discover emergent capabilities." Translation: when a normal merge gives you something boringly in-between, a little noise can push it toward something with character. Whether that character is good is a coin flip you get to control with a seed.

How it works

Standard merge core: model_A, model_B, merge_ratio (0.5, "0=full A, 1=full B" per the tooltip). Then the noise layer:

  • noise_strength (0.05, range up to 0.5) - how much noise, relative to the weights. Start at 0.03–0.05; the README is emphatic that too much destroys coherence.
  • noise_pattern - seven flavors: gaussian (default, general purpose), uniform, structured (block patterns, keeps coherence), layer_scaled (more noise deeper in), adaptive (more noise where models are similar), perlin (smooth organic variation), gradient (directional).
  • seed (42) - reproducibility. Set it, save the workflow, and a good result is repeatable forever.

The optional knobs: layer_scaling_factor (1.5, "deeper=more noise"), noise_decay (0.9, how fast noise fades per layer), adaptive_threshold (0.3, similarity cutoff for adaptive mode), perlin_frequency (2), and two focus toggles - focus_attention (on, style/content) and focus_mlp (off, feature extraction) - plus preserve_norms to keep tensor magnitudes stable. Output: a single merged_model.

The settings that matter

Day one, use exactly this: gaussian, strength 0.03, preserve_norms on, seed set. Switch to adaptive if your two models are nearly identical and you want differentiation. The rest is exploration territory - the README's own best-practice list reads like a lab notebook, which is the right spirit for this node.

Installing it

Part of ComfyUI-Tensor-Prism-Node-Pack. ComfyUI Manager → search "Tensor Prism" → Install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/AstrionX/ComfyUI-Tensor-Prism-Node-Pack

No model downloads; deps are torch, numpy, psutil. The README's clone URL is typo'd - use Manager or the URL above.

The honest caveat

This is the most experimental node in an already-experimental, first-author "vibe-coded" pack. The math is transparent enough - it's additive noise around a normal merge - but "emergent capabilities" is marketing-speak for "sometimes you roll something interesting." Treat noise injection as a search tool: run a few seeds, keep the one that lands, and always compare against the plain merge at the same ratio. If the plain merge is already good, noise is probably a downgrade. If it's boringly in-between, this is worth the roll.

CategoryTensor_Prism/Merge

Inputs (13)

NameTypeDefaultDescription
model_AMODELFirst model to merge
model_BMODELSecond model to merge
merge_ratioFLOAT0.500–1Base merge ratio (0=full A, 1=full B)
noise_strengthFLOAT0.0500–0.5Overall noise injection strength
noise_patternCOMBOgaussianType of noise pattern to inject
seedINT420–18446744073709550000Random seed for reproducibility
layer_scaling_factoroptFLOAT1.50.5–5Scale factor for layer-based noise (deeper=more noise)
adaptive_thresholdoptFLOAT0.300–1Similarity threshold for adaptive noise
noise_decayoptFLOAT0.900.5–1Decay factor per layer (1.0=no decay)
perlin_frequencyoptFLOAT2.00.5–10Frequency for Perlin noise
focus_attentionoptBOOLEANtrueFocus noise on attention layers
focus_mlpoptBOOLEANfalseFocus noise on MLP layers
preserve_normsoptBOOLEANtruePreserve tensor norms after injection

Outputs (1)

NameTypeDescription
merged_modelMODEL