SDXL MBW Layers Binary
Flip UNet blocks fully on or off, one at a time
- MBW_LAYERS
This is the on/off sibling of SDXL MBW Layers. Where that node blends each UNet block by any weight from 0 to 1, this one only offers two states per block - fully from one model or fully from the other, no blend in between. The pack's README is upfront about why these binary variants exist: they make it "easy to extract specific layers," meaning this is a diagnostic node for figuring out where a specific trait lives in the network, not a tool for producing a finished merge in one pass.
The layout
The same 19-block shape SDXL MBW Layers uses, just BOOLEAN instead of FLOAT:
input_blocks.0throughinput_blocks.8(9 booleans, the encoder side)middle_blocks(1 boolean, the bottleneck)output_blocks.0throughoutput_blocks.8(9 booleans, the decoder side)
All default false. That's not neutral - it behaves like every block being weighted 0 rather than a 50/50 merge, so nothing changes until you start checking boxes.
Output
A single MBW_LAYERS, wired the same way as the rest of the pack's MBW nodes - into SDNext Merge's optional_mbw_layers_alpha.
Why you'd actually reach for the binary version over the float one
Say a merge partner has a face or a lighting style you want, but pulling it in with a flat alpha also drags in traits you don't want. The float MBW node lets you dial each block down, but you're guessing at fractional weights across 19 sliders with no idea where to start. This node turns that into a bisection problem instead: flip half the blocks on, merge, look. Landed the trait? Narrow to that half. Didn't? Try the other half. A handful of passes narrows a 19-block search space down to the one or two blocks actually responsible - at which point you switch back to the float node and dial in exactly how much of that block you want, rather than the blunt full-on it gives you here.
Installing it
ComfyUI Manager: search TechNodes, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/TechnoByteJS/ComfyUI-TechNodes --depth 1
No downloads, no dependencies.
Where people get burned
Flip more than one block on at a time on your first pass and you lose the ability to attribute the result to any single block - the whole value of this node is isolating one variable, so toggle, merge, generate, compare, and only then move on. It's built for SDXL's 19-block shape specifically; the SD1 MBW Layers Binary sibling handles SD 1.5's 25-block layout, and mixing the two against the wrong architecture won't produce a usable merge. And if what you actually want is a partial blend rather than a hard switch - say, 30% of a block rather than fully off or fully on - that's what the float SDXL MBW Layers node is for; this one deliberately doesn't do gradation.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| input_blocks.0 | BOOLEAN | false | — |
| input_blocks.1 | BOOLEAN | false | — |
| input_blocks.2 | BOOLEAN | false | — |
| input_blocks.3 | BOOLEAN | false | — |
| input_blocks.4 | BOOLEAN | false | — |
| input_blocks.5 | BOOLEAN | false | — |
| input_blocks.6 | BOOLEAN | false | — |
| input_blocks.7 | BOOLEAN | false | — |
| input_blocks.8 | BOOLEAN | false | — |
| middle_blocks | BOOLEAN | false | — |
| output_blocks.0 | BOOLEAN | false | — |
| output_blocks.1 | BOOLEAN | false | — |
| output_blocks.2 | BOOLEAN | false | — |
| output_blocks.3 | BOOLEAN | false | — |
| output_blocks.4 | BOOLEAN | false | — |
| output_blocks.5 | BOOLEAN | false | — |
| output_blocks.6 | BOOLEAN | false | — |
| output_blocks.7 | BOOLEAN | false | — |
| output_blocks.8 | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MBW_LAYERS | MBW_LAYERS | — |