Geometric Sum
Interpolate in log space — the geometric mean between two models
- a (delta|param|weight)
- b (delta|param|weight)
- alpha (0.5)
- recipe
Geometric Sum Mecha Recipe is the geometric-mean version of a weighted sum. Where a normal blend computes (1−alpha)·A + alpha·B, this computes A^(1−alpha) · B^alpha - an interpolation in log space, taken back to the original scale. At alpha = 0.5 it's the geometric mean of the two models: the "halfway point" in multiplicative terms rather than additive ones.
That distinction sounds like pedantry, but it changes merges in a real way. Additive blending treats the weights like positions on a line; multiplicative blending treats them like ratios - changes are relative to magnitude. For some model pairs that's the more natural notion of "in between," especially when the two sides differ in scale. This node is one of the smaller, quieter ones in the Mecha pack, and honestly underused - it's a one-dial alternative to Weighted Sum that a lot of people never try.
Inputs
a (delta|param|weight)andb (delta|param|weight)- the two sides.alpha (0.5)- the blend point, as aMECHA_RECIPE. 0 = all A, 1 = all B. Feed it aFloatfor a flat value.merge_checkpointing- the usual branch-cache toggle.
Output: one recipe (MECHA_RECIPE).
How it behaves
Mechanically, the method converts both sides to complex, raises A to 1−alpha and B to alpha, multiplies, and keeps the real part. The result is element-wise positive-by-construction in the same way a product is - which is worth knowing, because sign matters. For weights that live on one side of zero (magnitudes), geometric interpolation is smooth and sensible. For weights that cross zero, log-space interpolation gets awkward, and that's a case where you'd prefer Weighted Sum. If your merge comes out looking wrong at a glance, check whether your weights are the sign-crossing kind before blaming the node.
Install & gotchas
ComfyUI Manager → search mecha → Mecha Merge Node Pack, or:
cd ComfyUI/custom_nodes
git clone https://github.com/ljleb/comfy-mecha.git
pip install -r comfy-mecha/requirements.txt
Restart; only dependency is sd-mecha==1.1.7.
The practical notes are short because it's a simple node. Keep alpha in [0, 1] (out-of-range is legal but rapidly means "more than all of B," which is rarely what you want), and remember the output is a weight-space blend, not a delta - if you want to combine this with add-difference-style recipes, treat it as a weight input, not a delta. It's also worth an A/B against Weighted Sum at the same alpha on your actual pair before committing; the two can look surprisingly different on some checkpoints and nearly identical on others.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| a (delta|param|weight) | MECHA_RECIPE | — | |
| b (delta|param|weight) | MECHA_RECIPE | — | |
| alpha (0.5)opt | MECHA_RECIPE | 0.5 | — |
| merge_checkpointingopt | BOOLEAN | false | Speeds up an entire branch of a merge graph that does not change often in exchange of memory. - true: store the first output of this recipe node on cpu memory in fp16. On subsequent workflow executions, as long as the inputs do not change, the cached keys are returned after being cast to the original device and dtype. - false: do not store the output. The recipe and its inputs will re-execute on subsequent workflow executions. Note that the memory used to checkpoint the output is distinct from the cache feature. In general, you probably want to either use this *or* a cache unit, but not both at the same time because the memory adds up. The difference between merge checkpointing and cache is that merge checkpointing completely re-merges from scratch if any input changes. Merge checkpointing is also generally much faster than cache in the fast path. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| recipe | MECHA_RECIPE | — |