Nodes/TechNodes/SD1 MBW Layers
ComfyUI Node

SD1 MBW Layers

Per-block merge weights for SD 1.5's UNet

By TechnoByteJS·Created 2 years ago·Updated 2 years ago· 14
SD1 MBW Layers
    • MBW_LAYERS
    input_blocks.00.50
    input_blocks.10.50
    input_blocks.20.50
    input_blocks.30.50
    input_blocks.40.50
    input_blocks.50.50
    input_blocks.60.50
    input_blocks.70.50
    input_blocks.80.50
    input_blocks.90.50
    input_blocks.100.50
    input_blocks.110.50
    middle_blocks0.50
    output_blocks.00.50
    output_blocks.10.50
    output_blocks.20.50
    output_blocks.30.50
    output_blocks.40.50
    output_blocks.50.50
    output_blocks.60.50
    output_blocks.70.50
    output_blocks.80.50
    output_blocks.90.50
    output_blocks.100.50
    output_blocks.110.50

    Merge Block Weighted (MBW) is actually older than SDXL - it started life as a dedicated A1111 extension (sdweb-merge-block-weighted-gui) built specifically for SD 1.5's UNet, letting people assign a different merge weight to each block instead of one flat alpha for the entire model. This node is that same idea, ported to ComfyUI: it doesn't merge anything by itself, it's a dial board that outputs one MBW_LAYERS bundle for SDNext Merge's optional_mbw_layers_alpha input to consume.

    The layout

    25 floats, all 0–1, all defaulting to 0.5 (which is identical to a flat, unweighted merge - you have to actually move sliders for this node to change anything):

    • input_blocks.0 through input_blocks.11 - 12 encoder blocks.
    • middle_blocks - the bottleneck.
    • output_blocks.0 through output_blocks.11 - 12 decoder blocks.

    That 12-in/1-mid/12-out shape is specific to SD 1.5's smaller UNet - SDXL's is 9-in/1-mid/9-out, which is why there's a separate SDXL MBW Layers node rather than one shared field set. Feed this SD1 node's output into a merge of two SDXL checkpoints and the block counts don't line up; use the right one for your base architecture.

    SD 1.5 is still very much a going concern in 2026 despite everything that's shipped since - plenty of people still run it, still merge it, and MBW's original use case was exactly this: figuring out which of its 25 blocks a specific trait (a face, a style, a bad habit) actually lives in.

    Output

    A single MBW_LAYERS - wires into SDNext Merge's optional_mbw_layers_alpha, where it overrides both the flat alpha and any mbw_preset_alpha selection.

    Installing it

    ComfyUI Manager: search TechNodes, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/TechnoByteJS/ComfyUI-TechNodes --depth 1
    

    Nothing else to install.

    Where people get burned

    Architecture mismatch is the main one - this node is SD 1.5-shaped, and using it against an SDXL merge (or the reverse, using the SDXL node against SD 1.5 checkpoints) simply doesn't fit. Beyond that, treat hand-tuning 25 sliders as genuinely exploratory: the original MBW community's own advice was to play with the presets first to get a feel for what each block does, because it's hit-or-miss without that intuition. SDNext Merge's mbw_preset_alpha dropdown ships 39 named presets for exactly this reason - reach for this node once you already know which block you're chasing, and consider the SD1 MBW Layers Binary sibling if you want a hard on/off per block to isolate a trait before dialing in how much of it you want.

    CategoryTechNodes/merging

    Inputs (25)

    NameTypeDefaultDescription
    input_blocks.0FLOAT0.500–1
    input_blocks.1FLOAT0.500–1
    input_blocks.2FLOAT0.500–1
    input_blocks.3FLOAT0.500–1
    input_blocks.4FLOAT0.500–1
    input_blocks.5FLOAT0.500–1
    input_blocks.6FLOAT0.500–1
    input_blocks.7FLOAT0.500–1
    input_blocks.8FLOAT0.500–1
    input_blocks.9FLOAT0.500–1
    input_blocks.10FLOAT0.500–1
    input_blocks.11FLOAT0.500–1
    middle_blocksFLOAT0.500–1
    output_blocks.0FLOAT0.500–1
    output_blocks.1FLOAT0.500–1
    output_blocks.2FLOAT0.500–1
    output_blocks.3FLOAT0.500–1
    output_blocks.4FLOAT0.500–1
    output_blocks.5FLOAT0.500–1
    output_blocks.6FLOAT0.500–1
    output_blocks.7FLOAT0.500–1
    output_blocks.8FLOAT0.500–1
    output_blocks.9FLOAT0.500–1
    output_blocks.10FLOAT0.500–1
    output_blocks.11FLOAT0.500–1

    Outputs (1)

    NameTypeDescription
    MBW_LAYERSMBW_LAYERS