Nodes/ComfyUI_agilly1989_motorway/ModelMergeSD2_motorway_edition
ComfyUI Node

ModelMergeSD2_motorway_edition

SD 2.x, block by block — the merge node nobody fights over

By agilly1989·Created 2 years ago·Updated about a year ago· 7
ModelMergeSD2_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
INPUT_model1_keymodel1
INPUT_model2_keymodel2
time_embed.1.00
label_emb.1.00
input_blocks.0.1.00
input_blocks.1.1.00
input_blocks.2.1.00
input_blocks.3.1.00
input_blocks.4.1.00
input_blocks.5.1.00
input_blocks.6.1.00
input_blocks.7.1.00
input_blocks.8.1.00
input_blocks.9.1.00
input_blocks.10.1.00
input_blocks.11.1.00
middle_block.0.1.00
middle_block.1.1.00
middle_block.2.1.00
output_blocks.0.1.00
output_blocks.1.1.00
output_blocks.2.1.00
output_blocks.3.1.00
output_blocks.4.1.00
output_blocks.5.1.00
output_blocks.6.1.00
output_blocks.7.1.00
output_blocks.8.1.00
output_blocks.9.1.00
output_blocks.10.1.00
output_blocks.11.1.00
out.1.00
OUTPUT_MODEL_keyMODEL

SD 2.x is the version of Stable Diffusion the ecosystem quietly moved past - the checkpoint ecosystem never matched SD 1.5's, and the ModelMergeSD2 node exists because the architecture does, not because it's a hot destination for merges. If you're here, you're either maintaining an SD2.x model or finishing off a merge someone else started. This is its Motorway-ed clone.

The block layout

The structure is identical to SD1's - the node exposes one float per named region of the UNet:

  • time_embed, label_emb - the conditioning inputs.
  • input_blocks.0input_blocks.11 - the encoder; lower indices handle coarse layout, higher indices finer features.
  • middle_block.0middle_block.2 - the bottleneck, the most influential region.
  • output_blocks.0output_blocks.11 - the decoder, where texture and finish live.
  • out - the final output projection.

Same defaults, same trap: everything is 1.0, which means all-defaults hands you model2 wholesale. The practical workflow is identical to the SD1 node too - pick a base blend value for all the floats, then raise or lower individual blocks to steer composition versus finish. The KB's merge framing applies: per-block merging is how you decide which parent's strength shows up where, at the cost of some consistency.

The one genuinely useful detail: this node (and its SD1 sibling) work by long-prefix matching weight names to block names, so the ratio you set on input_blocks.3 covers every tensor whose name starts with that prefix. That's why the granularity feels right - it's whole-block, not per-layer, and that's what people actually want to control.

The inputs

  • INPUT_model1_key (default model1) and INPUT_model2_key (default model2) - the two SD2.x models.
  • The block ratios above, each 0.0–1.0, step 0.01, default 1.0.
  • OUTPUT_MODEL_key (default MODEL) - where the merged model lands.

The wrapper keeps the ratios as widgets, turns the models into key strings, and keyed-writes the result. Runtime behavior matches stock ModelMergeSD2.

Install

One install for the whole pack. ComfyUI Manager, search "ComfyUI_agilly1989_motorway", or:

cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway

Restart ComfyUI. No requirements.txt, no model downloads.

Troubleshooting

  • Result is pure model2? Every ratio defaults to 1.0 - set a base blend first.
  • Don't cross-merge SD2.x weights with SD1.x or SDXL. The node will run; the output won't be usable. Use ModelMergeSD1 or ModelMergeSDXL for those.
  • 'MotorwayClass' object has no attribute 'hash_' = a model key isn't in the Motorway; check the loaders ran and the key spelling matches (case-sensitive).
  • Pack caveats: BETA, and the newest published version (1.1.7) disabled clone generation, so on a fresh install these _motorway_edition nodes may be missing from the menu. They're present in the 1.1.0–1.1.6 builds comfy.icu indexed.
Categoryagilly1989 Nodes/Motorway-ed/advanced/model_merging/model_specific

Inputs (34)

NameTypeDefaultDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨
INPUT_model1_keySTRINGmodel1
INPUT_model2_keySTRINGmodel2
time_embed.FLOAT1.000–1
label_emb.FLOAT1.000–1
input_blocks.0.FLOAT1.000–1
input_blocks.1.FLOAT1.000–1
input_blocks.2.FLOAT1.000–1
input_blocks.3.FLOAT1.000–1
input_blocks.4.FLOAT1.000–1
input_blocks.5.FLOAT1.000–1
input_blocks.6.FLOAT1.000–1
input_blocks.7.FLOAT1.000–1
input_blocks.8.FLOAT1.000–1
input_blocks.9.FLOAT1.000–1
input_blocks.10.FLOAT1.000–1
input_blocks.11.FLOAT1.000–1
middle_block.0.FLOAT1.000–1
middle_block.1.FLOAT1.000–1
middle_block.2.FLOAT1.000–1
output_blocks.0.FLOAT1.000–1
output_blocks.1.FLOAT1.000–1
output_blocks.2.FLOAT1.000–1
output_blocks.3.FLOAT1.000–1
output_blocks.4.FLOAT1.000–1
output_blocks.5.FLOAT1.000–1
output_blocks.6.FLOAT1.000–1
output_blocks.7.FLOAT1.000–1
output_blocks.8.FLOAT1.000–1
output_blocks.9.FLOAT1.000–1
output_blocks.10.FLOAT1.000–1
output_blocks.11.FLOAT1.000–1
out.FLOAT1.000–1
OUTPUT_MODEL_keySTRINGMODEL

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨