SDXL-SGM Blocks
26 sliders for the UNet
- recipe
If you came from the old SuperMerger world, you know block-weighted merging: instead of one alpha for the whole model, you give every section of the UNet its own weight, so layer 0 of the model comes from A while layer 20 comes from B. The SDXL-SGM Blocks node (class SDXL-SGM Mecha Blocks Parameters) brings that exact idea to comfy-mecha.
It's a param node: it produces a MECHA_RECIPE of per-block weights that you feed into a merge method's (delta|param|weight) input. With block weights connected, a method like Weighted Sum applies a different alpha per UNet block instead of one global value.
The inputs
It's a grid of floats that maps onto the SDXL UNet:
BASE- the input/output stemIN00–IN08- the nine input blocks (downsampling side)M00- the single middle blockOUT00–OUT08- the nine output blocks (upsampling side)VAE- the autoencoder (set to 0 to keep one VAE)
That's the standard SDXL block layout - 26 block values plus base and VAE - the same shape of control SuperMerger users expect. A classic use: drop the values in the IN blocks toward A and the OUT blocks toward B, so the merge takes the early structure from one model and the later detail from the other.
How it works
Under the hood the node builds a literal weight recipe in the sdxl-supermerger_blocks layout and converts it to the sdxl-sgm config - the pack reuses the block layout that SuperMerger made familiar, then maps it onto SDXL's real keys. The result is a MECHA_RECIPE; plug it into a merge recipe node, then finish at Mecha Merger for actual MODEL/CLIP/VAE outputs.
Install
Same as the whole pack: ComfyUI Manager → search "mecha" → Mecha Merge Node Pack, or:
cd ComfyUI/custom_nodes
git clone https://github.com/ljleb/comfy-mecha.git
pip install -r comfy-mecha/requirements.txt
Restart ComfyUI. Only dependency is sd-mecha; no model downloads.
Gotchas
Block weights are the deep end of merging - easy to over-tune, and a block map that "worked" for someone else's checkpoints usually won't transfer cleanly. Start with all blocks equal (which is just a normal weighted sum) and move a few sliders at a time, or you'll have no idea which block did what. Also: this node is for the SGM key layout; if your checkpoints are kohya-layout, the Blocks Mecha Hyper node in the same pack (with its own model-config dropdown) is the more flexible sibling.
Inputs (21)
| Name | Type | Default | Description |
|---|---|---|---|
| BASE | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| IN00 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| IN01 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| IN02 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| IN03 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| IN04 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| IN05 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| IN06 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| IN07 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| IN08 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| M00 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| OUT00 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| OUT01 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| OUT02 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| OUT03 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| OUT04 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| OUT05 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| OUT06 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| OUT07 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| OUT08 | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| VAE | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| recipe | MECHA_RECIPE | — |