Nodes/ComfyUI Easy Use/XY Inputs: ModelMergeBlocks //EasyUse
ComfyUI Node Runs on cloud

XY Inputs: ModelMergeBlocks //EasyUse

ModelMergeBlocks — sweeping block-weight merges instead of guessing

By yolain·Created 3 years ago·Updated 8 days ago· 2,633
XY Inputs: ModelMergeBlocks //EasyUse
    • X or Y
    ckpt_name_1
    ckpt_name_2
    vae_useUse Model 1
    presetpreset
    values1,0,0; 0,1,0; 0,0,1; 1,1,0; 1,0,1; 0,1,1;

    This is a niche node for a niche activity: block-weighted checkpoint merging, compared side by side across multiple weight combinations. If you've never merged models by hand you probably don't need this page. If you have, you already know why eyeballing a single merge ratio and hoping is a bad way to find a good one - this node builds the axis for a grid that shows you several ratios at once.

    What block-weight merging actually is

    A standard model merge blends two checkpoints uniformly - one ratio, applied everywhere. Block-weight merging (often called MBW, the technique popularized in the A1111 era by dedicated merge-block tooling) instead lets you set a different blend ratio for different groups of the UNet's blocks: input blocks, middle blocks, output blocks. Merging only the IN blocks pulls in one model's early-layer composition tendencies while keeping the other's later-layer style; merging only OUT does roughly the reverse. It's a much finer instrument than a single slider, and also much easier to produce a genuinely broken merge with if you're guessing.

    The inputs that matter

    ckpt_name_1 and ckpt_name_2 are the two checkpoints to merge - both required, both populated from whatever's in your checkpoints folder. vae_use decides which of the two donates its VAE to the merged result (Use Model 1 or Use Model 2); the merge itself doesn't blend VAEs, it picks one.

    preset gives you the standard named block-group shorthands instead of typing raw ratios by hand: MMB-ALL merges everything uniformly, MMB-IN/MMB-MID/MMB-OUT isolate one block group at a time, MMB-INMID/MMB-INOUT/MMB-MIDOUT combine two of the three, and MMB-NONE merges nothing (useful as a baseline point on your sweep). values is where the actual ratios live - a multiline string of comma-separated weights per block group, one line per merge point, and per the pack's own changelog you can import these from a CSV file rather than typing them by hand, which is worth doing the moment you're testing more than a handful of points.

    Output is a single X_Y, feeding into Easy-Use's XY Plot node the same way every other node in this family does - this one doesn't merge or render anything by itself, it defines the sweep.

    Installing it

    ComfyUI Manager: search ComfyUI Easy Use, install, restart. By hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yolain/ComfyUI-Easy-Use
    

    Windows: double-click install.bat. Linux/Mac: run pip install -r requirements.txt yourself. Restart ComfyUI. No extra downloads for this node specifically - just the two checkpoints you're merging, already on disk.

    Where people get stuck

    The biggest time sink is scope creep on values - every line is a full model merge plus a full generation, and merging large checkpoints isn't free; a "quick" 10-point sweep across two axes can turn into a genuinely long queue and a lot of disk churn if your merge node writes intermediate checkpoints. Start with the named presets (MMB-IN, MMB-MID, MMB-OUT) before hand-rolling custom per-block ratios - they cover the interesting extremes and tell you fast whether fine-grained block tuning is even worth pursuing for your two specific checkpoints. And if the merged results all look nearly identical regardless of preset, check vae_use and confirm the two checkpoints you picked are actually different enough architecturally to produce a meaningful blend - merging two very similar fine-tunes of the same base rarely shows dramatic differences across block groups.

    CategoryEasyUse/XY Inputs

    Inputs (5)

    NameTypeDefaultDescription
    ckpt_name_1COMBO0 options:
    ckpt_name_2COMBO0 options:
    vae_useCOMBOUse Model 12 options: Use Model 1, Use Model 2
    presetCOMBOpreset10 options: Preset, MMB-ALL:1,1,1, MMB-IN:1,0,0, MMB-MID:0,1,0, MMB-OUT:0,0,1, MMB-INMID:1,1,0, +4
    valuesSTRING1,0,0; 0,1,0; 0,0,1; 1,1,0; 1,0,1; 0,1,1;

    Outputs (1)

    NameTypeDescription
    X or YX_Y