Nodes/Model Utility Toolkit/Merge Models (2 Models)
ComfyUI Node

Merge Models (2 Models)

Blend two UNet-only diffusion models

By silveroxides·Created about a year ago·Updated 4 days ago· 14
Merge Models (2 Models)
    • output_filename
    • documentation
    execution_mode
    model_a
    model_b
    calc_mode
    mismatch_modeskip
    alignment_modepad/crop
    alpha0.50
    beta0.50
    gamma0.990
    delta2.00
    epsilon0.01
    zeta0.00
    seed0
    output_filenamemerged_2_model
    save_dtype
    process_device
    exclude_patterns
    discard_patterns
    glob_patternsfalse
    lazy_loadtrue
    force_clear_cachetrue
    override_dtypefalse

    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.

    CategoryModelUtils/Merging

    Inputs (22)

    NameTypeDefaultDescription
    execution_modeCOMBO2 options: MERGE, DOCUMENTATION ONLY
    model_aCOMBO1 options: None
    model_bCOMBO1 options: None
    calc_modeCOMBO10 options: Weight-Sum, Comparative-Interpolation, Power-Up (DARE), Power-Up (DARE+TIES), SVD LoRA Extraction, Enhanced Man Interp, +4
    mismatch_modeCOMBOskip3 options: skip, zeros, error
    alignment_modeCOMBOpad/crop2 options: pad/crop, interpolate
    alphaFLOAT0.50-10–10
    betaFLOAT0.50-10–10
    gammaFLOAT0.990-10–10
    deltaFLOAT2.00-10–10
    epsilonFLOAT0.01-10–10
    zetaFLOAT0.00-10–10
    seedINT00–18446744073709550000
    output_filenameSTRINGmerged_2_model
    save_dtypeCOMBO3 options: fp32, fp16, bf16
    process_deviceCOMBO2 options: cuda, cpu
    exclude_patternsSTRING
    discard_patternsSTRING
    glob_patternsBOOLEANfalseWhen True, exclude/discard patterns use glob syntax (* = any sequence, dots are literal). When False (default), patterns are Python regex matched as substrings.
    lazy_loadBOOLEANtrueLow memory mode: load tensors from disk on demand
    force_clear_cacheBOOLEANtrueClear CUDA cache after each layer
    override_dtypeBOOLEANfalseForce the entire model to be saved as the selected save_dtype. If False (default), higher precision dtypes are preserved.

    Outputs (2)

    NameTypeDescription
    output_filenameSTRING
    documentationSTRING