Merge Models (2 Models)
Blend two UNet-only diffusion models
- output_filename
- documentation
Same merge engine as CheckpointTwoMerger, but pointed at the other kind of model file: standalone diffusion-model weights loaded on their own, without a bundled CLIP or VAE. That's the norm for Flux-style workflows, where you load the UNet, the text encoder(s), and the VAE as three separate files through their own loaders instead of one all-in-one checkpoint. If your model of choice comes that way, this is the merger you want - not CheckpointTwoMerger, which expects the whole bundle.
What's actually different from the checkpoint version
Structurally, nothing - it's the identical parameter set, which tells you the pack shares one merge engine across model types rather than reimplementing the math three times. model_a and model_b pick your two source models. calc_mode selects the merge algorithm (the dropdown's options aren't documented in the node metadata, so check what's on your install). The six weight knobs - alpha, beta, gamma, delta, epsilon, zeta - carry the same defaults as CheckpointTwoMerger's two-input version too (0.5, 0.5, 0.99, 2, 0.01, 0), which is a useful thing to notice: every two-input merger in this pack, whether it's checkpoints, models, LoRAs, or text encoders, ships with identical defaults. Learn the pattern once on whichever node you touch first and it carries over.
mismatch_mode (default skip) and alignment_mode (default pad/crop) handle tensors that don't line up between the two source models - genuinely common when the two UNets come from different fine-tunes or slightly different training runs of the same architecture. exclude_patterns/discard_patterns (regex, or glob with glob_patterns on) let you keep specific layers out. lazy_load streams tensors from disk instead of holding both models in VRAM simultaneously; force_clear_cache clears CUDA memory between layers. save_dtype/override_dtype set output precision, process_device picks CPU or GPU for the math, and seed is there for whichever calc_mode uses randomness. Output is output_filename (default merged_2_model) plus 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 model downloads required - you're merging files you already have locally.
Where people get burned
The number one mistake with this node specifically is pointing it at the wrong kind of file - feeding it a full all-in-one checkpoint when it expects a bare diffusion-model file (or vice versa with CheckpointTwoMerger) will either fail to load into the dropdown at all or, worse, half-work in a confusing way depending on how your ComfyUI install categorizes the file. Check which loader you normally use for these two models before reaching for a merger.
Past that, the same caveats apply as any checkpoint merge: two UNets from genuinely different architectures (say, one Flux-family model and one SDXL-family model) will not produce something coherent no matter how mismatch_mode/alignment_mode are set - those settings keep the tensor math from crashing, they don't make the merge make sense. And merging two large diffusion models is memory-heavy; if you're getting OOM, lazy_load plus force_clear_cache is the first fix, process_device: cpu the fallback when even that isn't enough.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| execution_mode | COMBO | MERGE writes the selected result; DOCUMENTATION ONLY returns the operation reference without loading model files. | |
| model_a | COMBO | Primary diffusion model; anchors metadata, tensor shapes, and values preserved by exclusions or skip handling. | |
| model_b | COMBO | Second diffusion model contributing to the selected calculation mode. | |
| calc_mode | COMBO | Two-model operation to apply per comparable tensor; DOCUMENTATION ONLY shows its formula and coefficient meanings. | |
| mismatch_mode | COMBO | skip | Handle missing or incompatible tensors: preserve Model A, substitute zeros where supported, or abort with an error. |
| alignment_mode | COMBO | pad/crop | Resolve compatible shape differences by zero-padding/cropping or by interpolating Model B and Model C to Model A shape. |
| alpha | FLOAT | 0.50-10–10 | Mode-specific coefficient; use DOCUMENTATION ONLY for its exact role in the selected calculation mode. |
| beta | FLOAT | 0.50-10–10 | Mode-specific coefficient; some calculation modes ignore it. See DOCUMENTATION ONLY for the selected formula. |
| gamma | FLOAT | 0.990-10–10 | Mode-specific coefficient; some calculation modes ignore it. See DOCUMENTATION ONLY for the selected formula. |
| delta | FLOAT | 2.00-10–10 | Mode-specific coefficient; some calculation modes ignore it. See DOCUMENTATION ONLY for the selected formula. |
| epsilon | FLOAT | 0.01-10–10 | Mode-specific coefficient; some calculation modes ignore it. See DOCUMENTATION ONLY for the selected formula. |
| zeta | FLOAT | 0.00-10–10 | Mode-specific coefficient; some calculation modes ignore it. See DOCUMENTATION ONLY for the selected formula. |
| seed | INT | 00–18446744073709550000 | Random seed used only by calculation modes with stochastic behavior. |
| output_filename | STRING | merged_2_model | Output filename without extension, written under the matching ComfyUI model directory. |
| save_dtype | COMBO | Output tensor dtype; when Override Dtype is disabled, source tensors with higher precision remain at that precision. | |
| process_device | COMBO | Device used for per-tensor merge arithmetic; CUDA out-of-memory retries the affected tensor on CPU. | |
| exclude_patterns | STRING | Newline-separated regex or glob patterns for tensors excluded from merging and preserved from Model A. | |
| discard_patterns | STRING | Newline-separated regex or glob patterns for tensors omitted entirely from the output. | |
| 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 | * | — |
| documentation | STRING | — |