Merge Models (3 Models)
Three-way blending for UNet-only diffusion models
- output_filename
- documentation
ModelTwoMerger with a third input. Same idea as CheckpointThreeMerger vs CheckpointTwoMerger, just aimed at standalone diffusion-model files instead of full checkpoints - the UNet-only weights you'd load through a dedicated diffusion-model loader rather than a checkpoint loader, which is how most Flux-family workflows are wired. If you're merging three of those in one shot instead of chaining two-way merges twice, this is the node.
How it works
model_a, model_b, model_c are your three source models. calc_mode picks the merge algorithm - the dropdown's option list isn't documented in the schema, so open it on your install to see what's there. The six weight knobs default to the three-input pattern this pack uses consistently: alpha, beta, gamma all at 0.5 (one knob per source, a flat three-way split reads as the obvious default), delta at 2, epsilon at 0.01, zeta at 0 - the same shape as CheckpointThreeMerger and LoRAThreeMerger. None of the six ship a tooltip, so the defaults are your best guide until you've experimented or checked what your particular calc_mode does with them.
mismatch_mode (default skip) and alignment_mode (default pad/crop) reconcile tensors that don't match across all three source models - worth knowing this exists as a real setting, because three separately fine-tuned UNets frequently don't share identical layer shapes even within the same architecture family. exclude_patterns/discard_patterns (regex, glob if glob_patterns is on) scope specific layers out of the merge. lazy_load streams tensors from disk rather than loading three full models into memory at once - worth keeping on here more than almost anywhere else in the pack, since three UNets in VRAM simultaneously is a real number. force_clear_cache trades speed for headroom, save_dtype/override_dtype set output precision, process_device picks CPU or GPU, and seed covers whichever calc_mode uses randomness. Output is output_filename (default merged_3_model) and a documentation string.
Installing it
ComfyUI Manager: search Model Utility Toolkit, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-ModelUtils
Restart ComfyUI. No downloads beyond your existing model files - this is local tensor math, nothing fetched.
Where people get burned
Three-way model merging inherits the same honest tension the community has documented at length around checkpoint merging: combining models doesn't reliably combine their strengths, it tends to average them toward something blander than any single input. Adding a third source doesn't fix that - if anything it gives the merge more ways to drift from a coherent style. Use exclude_patterns deliberately if you only want one of your three models contributing a specific set of layers rather than its entire self diluted into the average.
The mechanical failure mode is the same as every merger in this pack: point it at the wrong file type (a full checkpoint instead of a bare diffusion model) and it won't behave as expected, and merging across genuinely different architectures produces garbage regardless of how carefully mismatch_mode/alignment_mode are tuned - those settings keep the math from erroring out, not from being meaningless. And three full-size diffusion models in flight is the heaviest memory ask in this pack's merger family; if lazy_load and force_clear_cache aren't enough, drop process_device to CPU and let it run slower instead of crashing.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| execution_mode | COMBO | 2 options: MERGE, DOCUMENTATION ONLY | |
| model_a | COMBO | 1 options: None | |
| model_b | COMBO | 1 options: None | |
| model_c | COMBO | 1 options: None | |
| calc_mode | COMBO | 4 options: Add-Difference, Train-Difference, Extract-Features, Add-Dissimilarities | |
| mismatch_mode | COMBO | skip | 3 options: skip, zeros, error |
| alignment_mode | COMBO | pad/crop | 2 options: pad/crop, interpolate |
| alpha | FLOAT | 0.50-10–10 | — |
| beta | FLOAT | 0.50-10–10 | — |
| gamma | FLOAT | 0.50-10–10 | — |
| delta | FLOAT | 2.00-10–10 | — |
| epsilon | FLOAT | 0.01-10–10 | — |
| zeta | FLOAT | 0.00-10–10 | — |
| seed | INT | 00–18446744073709550000 | — |
| output_filename | STRING | merged_3_model | — |
| save_dtype | COMBO | 3 options: fp32, fp16, bf16 | |
| process_device | COMBO | 2 options: cuda, cpu | |
| exclude_patterns | STRING | — | |
| discard_patterns | STRING | — | |
| glob_patterns | BOOLEAN | false | When True, exclude/discard patterns use glob syntax (* = any sequence, dots are literal). When False (default), patterns are Python regex matched as substrings. |
| lazy_load | BOOLEAN | true | Low memory mode: load tensors from disk on demand |
| force_clear_cache | BOOLEAN | true | Clear CUDA cache after each layer |
| override_dtype | BOOLEAN | false | Force the entire model to be saved as the selected save_dtype. If False (default), higher precision dtypes are preserved. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| output_filename | STRING | — |
| documentation | STRING | — |