Mecha Merge Node Pack
model merging nodes powered by sd-mecha, a memory efficient state dict recipe merger.
Nodes (83)
Add only what's actually similar
The more forgiving similarity merge — Add Cosine A, plus magnitude
The merge formula most CivitAI checkpoints are made of
Get the mask itself — 'where do these models disagree?' as a param recipe
Add a delta only where the parents actually disagree
Only add where the models are *truly* opposite — the strict mask
Merge with the model already in your workflow — no reload, no refile
Load *any* safetensors as a merge ingredient — checkpoints, LoRAs, even diffusers-style files
Permute attention layers so two models actually line up before you merge
Per-block merge weights — the SuperMerger MBW dial for ComfyUI
A true/false switch as a recipe — the pack's on/off dials are params too
Force a merge to run in fp64 or on CPU — the precision/VRAM escape hatch
Add a difference but refuse to leave the [A, B] band — the 'safe transplant' merge
Squash any merge into the box you define — bounds as a recipe list, stiffness as a dial
Mixing models by frequency — keep the texture of one, the structure of the other
DARE-style pruning for deltas — the n-supermario merge that beats plain averaging
Swap in the EMA weights before you merge — they're usually the better half
Extract a LoKr (the LoRA that kept its rank) from a merge delta
Turn a merge delta into an actual LoRA file
Extract a LyCORIS-format LoKr, for when the layout matters
Extract a LoRA the LyCORIS way — same SVD, different key names
Use A, and only fall back to default where A is missing
A plain number, wrapped
Weight FLUX's four sub-models separately — diffuser, CLIP-L, T5, and VAE as one param recipe
The merge that doesn't get dragged by outliers — a median instead of a mean
Interpolate in log space — the geometric mean between two models
Ask a recipe where it lives — and hand that answer back to the merge
Read a recipe's precision as a param — wire it into cast-style merges or just debug
Size a low-rank truncation automatically — rank = ratio × min(tensor dims)
Integer params as recipes — how you feed rank, maxiter, and seed into a merge
Merge a LoRA into a checkpoint with ComfyUI, no extra RAM
Translate a merge recipe between key layouts — kohya, diffusers, supermerger, and back
Paste a .mecha recipe string back into the graph — the load half of recipe bookkeeping
Stop re-SVDing the same merge — a persistent cache for the expensive methods
The terminal node — turn a recipe graph into a usable MODEL, CLIP, and VAE
Bundle any number of recipes into one wire — the input every multi-model merge needs
Per-key merge weights by pattern — block weights, but with regex instead of architecture
Freeze your merge in plain text (and share it without the gigabytes)
Turn a pile of models into deltas in one step
Turn any checkpoint into a merge ingredient
The mergekit stock recipe, now streaming on your GPU (or your CPU)
The weird interpolation node nobody tells you about (and why it exists)
The honest average for merging more than two models
Merge everything except the VAE (or whatever you don't want touched)
Quietly delete the NaN weights so your merge doesn't fall apart
Remove the part of B that points along A, and merge what's actually new
Keep only the VAE, the CLIP, or the UNet — merge pieces on purpose
Shuffle your model's neurons on purpose (research-grade merging)
Align models by permuting their weights
Align two models by rotation, not by averaging
Turn strength into a merge parameter
Weigh each part of an SD1 model separately — CLIP, VAE, UNet, EMA, scheduler
Per-part weights for SD1 in kohya's key layout — the LoRA merger's param node
Component weights for kohya-format LoRAs on SD1
Per-component weights for LyCORIS networks on SD1
SuperMerger-style block weights for SD1 — now in ComfyUI
One slider for all of SD1's blocks — the uniform block-weight shortcut
Weigh the five parts of an SD3 merge — two CLIPs, T5, UNet, and VAE
Merge the UNet at full strength and the text encoders at half
The one-slider param node for SDXL UNets that live in a diffusers folder
The kohya node for SDXL, except the UNet keys are diffusers-style
The node for the messiest common setup
Kohya checkpoint, diffusers UNet, LyCORIS LoRA
Per-component merge weights for kohya-style SDXL checkpoints
Per-component weights for kohya checkpoints with kohya-trained LoRAs
Per-component weights for kohya checkpoints with LyCORIS LoRAs
26 sliders for the UNet
The SuperMerger blocks param node that keeps the old muscle memory
Merge anything, keys be damned
The merge that goes around, not through
The plumbing node you'll probably never wire by hand
When a merge recipe needs to be a text value
How you build a delta, the move every good merge starts with
Swap a slice of one model's weights with another's
The full version with geometric median, model stock, and every knob
Merge a pile of LoRAs without them fighting to a standstill
The LoRA-packing node for big style stacks
Keep the important weights, graft in the other model's values
The training trick that says 'change here, not there' — as a merge mask
The mask that keeps only what a fine-tune actually learned
The LoKr path
SVD your deltas
The weighted sum merge, without the 20 GB RAM spike
sd-mecha for Comfyui
comfy-mecha is a complete model merging nodepack for ComfyUI with a focus on low memory footprint.
- compose complex recipes without needing to save dozens of intermediate merges to disk
- merge loras to models
- support for block weights
- and a bunch of other stuff. For more info, see the nodes listing below. See also the readme of the underlying library sd-mecha
Workflows
Basic weighted sum

Clipped add difference

Ties merging

Recipe workflows can get much, much more complex than this.
If you are familiar with writing python code, you might be interested in using the sd-mecha library directly for experiments as an alternative to ComfyUI: https://github.com/ljleb/sd-mecha
Install
Install with ComfyUI-Manager
Assuming you have ComfyUI-Manager installed:
- Open a browser tab on ComfyUI
- Click on the "Manager" button
- Click on "Install Custom Nodes"
- Search for "mecha"
- Install "Mecha Merge Node Pack"
Install manually
You can also install the node pack manually:
cd custom_nodes
git clone https://github.com/ljleb/comfy-mecha.git
pip install -r comfy-mecha/requirements.txt
Nodes listing
Merge nodes
Nodes used for merging. They all have Recipe in their name except for Mecha Merger.
- nodes ending in
... Mecha Recipereturn a merge recipe Mecha Mergertakes aMECHA_RECIPEas input, and returns a unet and a text encoderSerializertakes aMECHA_RECIPEas input, and returns the recipe instructions using the mecha formatDeserializertakes a mecha recipe string as input, and returns the deserializedMECHA_RECIPE(this is the inverse operation ofSerializer)Mecha Model Recipeloads a model as a recipe to be used as input to other recipe nodes.Mecha Lora Recipeloads a lora model as a recipe to be used as input to other recipe nodes.Mecha Recipe Listtakes an arbitrary number of recipes and returns aMECHA_RECIPE_LIST. It is intended to be used as input to recipe nodes that accept an arbitrary number of recipes as input, i.e. theboundsinput ofClip Mecha RecipeMecha Subtract Recipe Listis the same asMecha Recipe Listbut takes an additionalbase_recipeinput that is subtracted from all other recipe inputs. This can simplify workflows that work with multiple deltas all obtained from the same base model.
Param Nodes
Nodes used to specify parameters to merge methods. For example, Weighted Sum Mecha Recipe has a param input alpha with a default value of 0.5.
Blocks Mecha Paramscan specify a different parameter for each block of the models to be merged (A.K.A. "merge block weighted")Float Mecha Paramsspecifies the same float for all keys of the models to be merged
Extensions
To add custom merge nodes, you can add python scripts that make use of the mecha extension API under the mecha_extensions directory.
The nodepack will run all scripts placed there and turn them into Comfy nodes.
Currently, the documentation for the mecha extension API is under construction. For now, to get more information, you can either take a look at the custom merge method example, open a discussion post to ask questions, or join the discord server.