𧬠Merge SD1
Block-weight merging for SD 1.5's 12 U-Net blocks
- model1
- model2
- model
- mbw
This is a dedicated block-weight merger for SD 1.5 models - you feed it two models and it blends them block by block through the U-Net's 12 IN blocks, the middle block, and the 12 OUT blocks, instead of averaging the whole network with one flat ratio. If the pack's general-purpose Model Merge node is the "merge two or three checkpoints, several modes, save to disk" tool, this is the narrower one: SD1.5-specific, and built entirely around getting the per-block weighting right.
Why block weighting beats a flat merge
A checkpoint is just weights, and merging is literally averaging two sets of them. Average the whole thing uniformly and you get the generic problem every merge has: you're not training anything new, you're interpolating, and a 50/50 blend of two models that disagree tends to land somewhere blander than either parent. Block weighting is what makes a merge deliberate instead of a coin flip - different blocks in the U-Net control different things (early blocks skew toward composition and structure, later ones toward fine detail and style), so you can pull hard on the blocks that carry the trait you want from model B while leaving the blocks that matter to model A alone.
The inputs and outputs that matter
input_blocks- the per-block weight string for SD 1.5's 12 IN blocks (0β11). The pack supports three ways to write this: a flat list of comma-separated values (0,1,1,0,β¦, one per block in order), explicitblock:weightpairs (4:0, 5:1, unlisted blocks inherit the last value given), or ranges (0-6:1). The default0-6:1,7-11:1mixes the range form with itself to set every block to 1.middle_block- a single weight for SD 1.5's one middle block. Default1.output_blocks- same idea asinput_blocksbut for the 12 OUT blocks, default written as the plain positional list1,1,1,1,1,1,1,1,1,1,1,1.model1/model2(optional) - the two checkpoints to blend, wired from your checkpoint loaders.
Outputs are the merged model and mbw, a string echoing the resolved block-weight pattern actually applied - handy for logging what you ran, or feeding into another node that wants to reuse the same pattern.
Installing it
ComfyUI Manager: search SDVN_Comfy_node, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/StableDiffusionVN/SDVN_Comfy_node
Then pip install -r custom_nodes/SDVN_Comfy_node/requirements.txt from your ComfyUI root, and restart.
Where people get burned
Wrong architecture, full stop. This node is SD 1.5-specific - 12 IN blocks, 1 middle, 12 OUT. Feed it an SDXL or Flux model and the block counts won't line up with what the node expects; use the pack's separate Merge SDXL node for that family instead.
Getting the three syntaxes crossed. The defaults deliberately show all three writing styles at once (range shorthand in input_blocks, a bare number in middle_block, a plain list in output_blocks) - that's the README's own demonstration, not three unrelated formats you have to pick just one of. Mixing them within a single field is fine; getting the block count wrong for the field you're editing is what actually breaks things.
Expecting the merge to fix a bad pairing. Block weighting controls where the blend happens, not whether the two models are compatible in the first place. Two checkpoints that are already stylistically close will merge into something coherent; two that fight each other will still fight, just with more precise knobs.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| input_blocks | STRING | 0-6:1,7-11:1 | β |
| middle_block | STRING | 1 | β |
| output_blocks | STRING | 1,1,1,1,1,1,1,1,1,1,1,1 | β |
| model1opt | MODEL | β | |
| model2opt | MODEL | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | MODEL | MΓ΄ hΓ¬nh ΔΓ£ gα»p |
| mbw | STRING | ThΓ΄ng sα» MBW ΔΓ£ dΓΉng |