𧬠Model Merge
Blend checkpoints (and extract LoRAs) with block control
- model_A
- model_B
- model_C
- clip_A
- clip_B
- clip_C
- vae
- MODEL
- CLIP
- VAE
This is the SDVN pack's take on model merging - the thing A1111 users know as the Checkpoint Merger. Blend two or three checkpoints into a new one, or pull the difference between two models out as a LoRA. It supports per-block weighting, so you can merge some layers hard and others not at all, which is where merging goes from "muddy average of two models" to something with actual intent behind it. It's an output node, so it can save the result straight to disk.
What merging actually is
A checkpoint is the full set of model weights. Merging averages the weights of two or more of them, and that averaging is exactly why merges tend to converge on the same faces and inherit each other's defects - you're not training anything new, just interpolating. Used with care it's still useful: blend a model that nails anatomy with one that nails a style, and you can land somewhere neither reaches alone. Used carelessly it's how the internet filled up with a thousand near-identical models. Block weighting is the tool that makes it deliberate rather than a slot machine.
The inputs and outputs that matter
Option- the merge mode. Merge Simple [A] passes A through; Merge Sum [AΒ·(1-M) + BΒ·M] is the standard weighted blend of two models; Merge Difference [A + (B-C)Β·M] adds the difference between B and C onto A (the "add the training from B" trick); Lora Export [A-B] extracts the difference of two checkpoints as a LoRA instead of a full model.Multiplier_M(default 1.0) - the blend ratio. In Merge Sum, 0.5 is a even split; lower leans toward A, higher toward B.MBW(optional) - the block-weight string. This is the power feature: instead of one ratio for the whole model, you specify weights per block using the pack's syntax (e.g.0-10:0, 11-18:1to merge only the later blocks). Leave it empty for a uniform merge.model_A/B/C,clip_A/B/C,vae(optional) - the model components to merge. Feed them from checkpoint loaders.Save(default true) andSave_name- write the result to disk and name it.Lora_rank(default 64) - only relevant in Lora Export mode; the rank of the extracted LoRA. Higher captures more, at a bigger file.
Outputs are the merged MODEL, CLIP, and VAE.
Installing it
ComfyUI Manager: search SDVN_Comfy_node, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/StableDiffusionVN/SDVN_Comfy_node
Then pip install -r custom_nodes/SDVN_Comfy_node/requirements.txt from your ComfyUI root, and restart.
Where people get burned
Merging across architectures. You cannot merge an SD 1.5 model with an SDXL one - the weight shapes don't match. Both inputs have to be the same base family. Same for Flux.
Block syntax confusion. The MBW string follows specific rules: unlisted blocks inherit the last value, ranges use start-end:weight, and SD 1.5 / SDXL / Flux have different block counts (12, 9, and 19 respectively). Get the count wrong and your weights land on the wrong layers. The pack README has the full syntax table - read it before doing surgical merges.
Expecting magic from a bad blend. Merging two models that fight each other gives you the worse of both. Start from models that are already close in style, and nudge, rather than trying to bolt opposites together.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| Option | COMBO | 4 options: Merge Simple [ A ], Merge Sum [ A * (1 - M) + B * M ], Merge Difference [ A + (B - C) * M ], Lora Export [ A - B] | |
| Checkpoint_A | COMBO | None | 1 options: None |
| Checkpoint_B | COMBO | None | 1 options: None |
| Checkpoint_C | COMBO | None | 1 options: None |
| Multiplier_M | FLOAT | 1.00-10β10 | β |
| Save | BOOLEAN | true | β |
| Save_name | STRING | model_merge | β |
| Lora_rank | INT | 641β4096 | β |
| model_Aopt | MODEL | β | |
| model_Bopt | MODEL | β | |
| model_Copt | MODEL | β | |
| clip_Aopt | CLIP | β | |
| clip_Bopt | CLIP | β | |
| clip_Copt | CLIP | β | |
| vaeopt | VAE | β | |
| MBWopt | STRING | β |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | β |
| CLIP | CLIP | β |
| VAE | VAE | β |