Nodes/ComfyUI_agilly1989_motorway/ModelMergeSD1_motorway_edition
ComfyUI Node

ModelMergeSD1_motorway_edition

SD 1.5 merges, block by block, in the Motorway

By agilly1989·Created 2 years ago·Updated about a year ago· 7
ModelMergeSD1_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 1.5 is the merge monster. Most of CivitAI's anime and photoreal checkpoints of that era are blends of blends, and the fine-grained way to do it is block-by-block: mix the encoder, the middle, and each decoder stage separately. ModelMergeSD1 is ComfyUI's dedicated per-block merge for SD1.x, and this is its Motorway-ed clone.

What the block structure means

The node exposes a float for every named region of the SD1 UNet - 28 in total. In practice you'll touch a handful:

  • time_embed and label_emb - the conditioning inputs: timestep and (for SD1, class/label) embeddings. Rarely the dial you want.
  • input_blocks.0 through input_blocks.11 - the encoder side. Lower indices are coarse structure, higher indices are finer features. This is where composition and layout live.
  • middle_block.0 through middle_block.2 - the bottleneck, the single most influential region in the model. If you can only change one thing, this is it.
  • output_blocks.0 through output_blocks.11 - the decoder side; the later the index, the more it's about texture, lighting, and finish.
  • out - the final projection back to the model's output space.

Each float defaults to 1.0, and - the standard merge-node trap - all-defaults means the result is model2. The workflow people actually use: set everything to a base blend (say 0.5), then raise or lower sections to steer one parent's influence. The KB's merging essay has the right frame here: merges "combine strengths of their parents at the cost of some consistency," and per-block merging is how you control which parent's strength shows up where.

The inputs

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

The wrapper keeps every block ratio as a widget, turns the two models into key strings, and keyed-writes the result. Runtime behavior is identical to stock ModelMergeSD1.

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.
  • ModelMergeSD2 is the same shape for SD2.x; don't cross-breed them. And don't use this node for SDXL - its block layout differs, so use ModelMergeSDXL there.
  • '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 🚌💨