Nodes/TechNodes/MBW Layers String
ComfyUI Node

MBW Layers String

Paste a block-weight list instead of dragging sliders

By TechnoByteJS·Created 2 years ago·Updated 2 years ago· 14
MBW Layers String
    • MBW_LAYERS
    mbw_layers[0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]

    Every other Merge Block Weighted node in this pack is a wall of sliders - 19 of them for SDXL, 25 for SD 1.5. This one is the escape hatch: a single multiline text field where you paste a flat list of numbers and get the same MBW_LAYERS bundle out that the slider nodes produce. It's for two situations specifically - someone shares a block-weight preset as text (MBW presets circulate this way in the merging community, the way named block-weight lists have since the technique's A1111 extension days) and you want to reuse it verbatim, or you're generating weight lists programmatically rather than clicking through two dozen sliders by hand.

    How it works

    There's exactly one field: mbw_layers, a multiline STRING. Its default value is a Python-list-looking string of 25 comma-separated 0.5s - [0.5, 0.5, 0.5, ...]. That count is worth noticing: 25 values matches SD 1.5's block layout (12 input blocks + 1 middle + 12 output blocks), the shape the sibling SD1 MBW Layers node uses - not SDXL's 19-block shape. If you're targeting an SDXL merge, you'd paste a 19-value list instead of leaving the default in place.

    The node doesn't merge anything itself; it just parses your string into the same MBW_LAYERS object the slider-based nodes build, ready to wire into SDNext Merge's optional_mbw_layers_alpha input.

    Output

    A single MBW_LAYERS bundle - wires the same way as every other MBW node in the pack.

    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 needed.

    Where people get burned

    The count mismatch is the real trap: the slider-based MBW nodes physically can't give you the wrong number of blocks for their architecture, but this text field will happily accept 19 values when your merge needs 25, or vice versa - nothing stops you from typing the wrong length, and the result is a broken merge rather than a clear error. Keep the list length matched to your target: 25 for SD 1.5, 19 for SDXL. Second, it's a plain comma-separated list of numbers - a trailing comma, a stray non-numeric entry, or mismatched brackets will trip the parser, so keep the shape identical to the default. This is a power-user node: if the sliders already make sense to you, use the sliders - this one exists for pasting a known-good list, not for hand-authoring one from scratch.

    CategoryTechNodes/merging

    Inputs (1)

    NameTypeDefaultDescription
    mbw_layersSTRING[0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]

    Outputs (1)

    NameTypeDescription
    MBW_LAYERSMBW_LAYERS