Nodes/Tensor Prism/Main Merge (Tensor Prism)
ComfyUI Node

Main Merge (Tensor Prism)

The pack's bread-and-butter, six ways to blend two models

By Arctenox·Created 12 months ago·Updated 6 months ago· 2
Main Merge (Tensor Prism)
  • model_A
  • model_B
  • merged_model
merge_ratio0.50
method
random_seed42
stochastic_prob0.10
freq_low_ratio0.50
freq_high_ratio0.50

If this pack has a default answer, this is it. Main Merge (Tensor Prism) is the simple, honest, whole-model merge: two models in, one ratio, six interpolation methods, one model out. No block ratios, no masks, no memory circus - just the fastest way to test whether merging two checkpoints is even worth doing before you graduate to the fancy tools.

Most CivitAI checkpoints are themselves merges of merges (the KB's checkpoint panel notes that merging is how the bulk of community models are made - fast, no training data, no GPU grind), and this node is the clean room in which to do that. It's also the right sanity baseline: if your sophisticated masked/block/spectral merge doesn't beat what a plain Main Merge at the same ratio produces, the sophistication was wasted.

How it works

model_A, model_B, merge_ratio (0 = all A, 1 = all B, default 0.5). Then pick a method from six:

  • linear - plain weighted average. Fast, and the source of the "everything converges to mush" problem.
  • slerp - spherical linear interpolation, which follows the curved geometry of weight space instead of cutting straight across it. The README's recommendation for blending very different models; it's the community's go-to for avoiding the washed-out middle.
  • cosine - cosine-curve interpolation, a softer variant of linear with smoother transitions around the middle.
  • directional - treats the blend as a vector move in weight space; can produce sharper character shifts.
  • frequency - blends in the frequency domain via FFT, with separate freq_low_ratio and freq_high_ratio dials so you can favor one parent's low-frequency (structure) or high-frequency (detail) content.
  • stochastic - randomly decides per-tensor which parent wins, seeded by random_seed (42) and controlled by stochastic_prob (0.1). The wildcard option; you're basically rolling dice over which model gets each weight.

Output: merged_model (MODEL), straight into a KSampler.

The settings that matter

Only merge_ratio and method matter for day one. Keep merge_ratio between 0.3 and 0.7 - the README's own tip is to start conservative, and ratios past 0.8 are where merges turn into "slightly worse model B". Reach for slerp when the models are genuinely different, linear when they're close cousins, and leave frequency/stochastic alone until you're curious.

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; dependencies are torch, numpy and psutil, which a stock ComfyUI already has. The README's clone URL is typo'd - use Manager or the URL above.

The honest caveat

Six methods sounds impressive; the honest version is that linear and slerp are the ones with a proven track record, and the other four are this pack's own flavor of experimentation. This is a first-time author's pack, openly "vibe-coded," with zero community corpus behind the exotic methods. The good news: Main Merge is simple enough that you can benchmark all six in an evening and keep what works for your models. That's the entire point of the node.

CategoryTensor_Prism/Core

Inputs (8)

NameTypeDefaultDescription
model_AMODEL
model_BMODEL
merge_ratioFLOAT0.500–1
methodCOMBO6 options: linear, slerp, cosine, directional, frequency, stochastic
random_seedoptINT42
stochastic_proboptFLOAT0.100–1
freq_low_ratiooptFLOAT0.500–1
freq_high_ratiooptFLOAT0.500–1

Outputs (1)

NameTypeDescription
merged_modelMODEL