ComfyUI Node

SD1-LDM Blocks

SuperMerger-style block weights for SD1 — now in ComfyUI

By ljleb·Created 3 years ago·Updated about a month ago· 101
SD1-LDM Blocks
    • recipe
    BASE0.00
    IN000.00
    IN010.00
    IN020.00
    IN030.00
    IN040.00
    IN050.00
    IN060.00
    IN070.00
    IN080.00
    IN090.00
    IN100.00
    IN110.00
    M000.00
    OUT000.00
    OUT010.00
    OUT020.00
    OUT030.00
    OUT040.00
    OUT050.00
    OUT060.00
    OUT070.00
    OUT080.00
    OUT090.00
    OUT100.00
    OUT110.00

    SD1-LDM Blocks (class SD1-LDM Mecha Blocks Parameters) is the node people have been waiting for since ComfyUI became a real option: SuperMerger-style block weights for SD1. It gives you 26 float sliders - BASE, IN00IN11, M00, OUT00OUT11 - one for each block of the SD1 UNet, and turns them into a single MECHA_RECIPE that weighs each block independently during a merge.

    Let me set the scene, because this is the node with a history. SuperMerger is the A1111 extension that's been keeping people on a legacy install purely because ComfyUI had no equivalent for its block-weight merging - the KB's own notes on who still runs A1111 name SuperMerger as the recurring reason. This node is that feature, natively in the mecha graph. If you've ever wondered why people obsess over block weights: different UNet blocks control different things (early IN blocks → composition and coarse structure, M00 → the middle/latent bottleneck, late OUT blocks → fine detail and high-frequency texture). A global alpha can't tell those apart; block weights can. That's the whole game.

    How it works

    SD1's UNet divides into 26 blocks: 12 input (IN00–IN11), the middle (M00), and 12 output (OUT00–OUT11), plus BASE for the shared/outer layers. The node builds a param recipe in the sd1-supermerger_blocks config (matching SuperMerger's block layout), then converts it to the sd1-ldm config - so the same block numbers you know from SuperMerger mean the same things here. Wire the output into a merge method's alpha/weight input and the merge applies each block's own strength.

    The inputs that matter:

    • BASE - the outermost layers (conv_in, time embedding, etc.).
    • IN00–IN11 - the downsampling/encoder blocks. Early ones shape composition; later ones mid-level features.
    • M00 - the middle block, the bottleneck.
    • OUT00–OUT11 - the upsampling/decoder blocks. Later ones increasingly control high-frequency detail.
    • recipe (output, param space) - the block param for sd1-ldm, ready for any method's weight input.

    All default to 0 - again, that's "no override," not "skip." A classic recipe: keep IN and OUT high to preserve structure and detail while pushing M00 down to soften a merge, or do the reverse to keep a model's "soul" while letting fine detail come from elsewhere.

    Install

    This is part of the Mecha Merge Node Pack (ljleb/comfy-mecha):

    • ComfyUI Manager → Install Custom Nodes → search "mecha" → Mecha Merge Node Pack, or manually:
    cd ComfyUI/custom_nodes
    git clone https://github.com/ljleb/comfy-mecha.git
    pip install -r comfy-mecha/requirements.txt
    

    Restart ComfyUI; it's under mecha. Only dependency is sd-mecha==1.1.7; no model downloads.

    Common issues

    • 0 vs 1 confusion is real. People set the block sliders to 1 expecting "full block strength," but in SuperMerger convention 1 is the typical block weight and 0 is the neutral baseline. Think of the method's own alpha as the global level and these as per-block multipliers around it.
    • Block numbers assume the LDM layout. The node converts from SuperMerger's block config to LDM internally, so the numbers you see are the ones you know - but only for SD1. SDXL has its own block node (SDXL-SGM Blocks) with different names.
    • More knobs, more blame. With 26 sliders you can absolutely make a merge worse, and it can be hard to tell which block did it. Change one or two blocks at a time and A/B the output before going full mad-scientist.

    This is the node that answers the "why is there no SuperMerger for ComfyUI" question. Block weights are the highest-leverage merging control that isn't just a global alpha - and now you don't need a legacy A1111 install to use them.

    Categorymecha

    Inputs (26)

    NameTypeDefaultDescription
    BASEFLOAT0.00-18446744073709550000–18446744073709550000
    IN00FLOAT0.00-18446744073709550000–18446744073709550000
    IN01FLOAT0.00-18446744073709550000–18446744073709550000
    IN02FLOAT0.00-18446744073709550000–18446744073709550000
    IN03FLOAT0.00-18446744073709550000–18446744073709550000
    IN04FLOAT0.00-18446744073709550000–18446744073709550000
    IN05FLOAT0.00-18446744073709550000–18446744073709550000
    IN06FLOAT0.00-18446744073709550000–18446744073709550000
    IN07FLOAT0.00-18446744073709550000–18446744073709550000
    IN08FLOAT0.00-18446744073709550000–18446744073709550000
    IN09FLOAT0.00-18446744073709550000–18446744073709550000
    IN10FLOAT0.00-18446744073709550000–18446744073709550000
    IN11FLOAT0.00-18446744073709550000–18446744073709550000
    M00FLOAT0.00-18446744073709550000–18446744073709550000
    OUT00FLOAT0.00-18446744073709550000–18446744073709550000
    OUT01FLOAT0.00-18446744073709550000–18446744073709550000
    OUT02FLOAT0.00-18446744073709550000–18446744073709550000
    OUT03FLOAT0.00-18446744073709550000–18446744073709550000
    OUT04FLOAT0.00-18446744073709550000–18446744073709550000
    OUT05FLOAT0.00-18446744073709550000–18446744073709550000
    OUT06FLOAT0.00-18446744073709550000–18446744073709550000
    OUT07FLOAT0.00-18446744073709550000–18446744073709550000
    OUT08FLOAT0.00-18446744073709550000–18446744073709550000
    OUT09FLOAT0.00-18446744073709550000–18446744073709550000
    OUT10FLOAT0.00-18446744073709550000–18446744073709550000
    OUT11FLOAT0.00-18446744073709550000–18446744073709550000

    Outputs (1)

    NameTypeDescription
    recipeMECHA_RECIPE