ModelMergeBlocks_motorway_edition
Keep model1's body, borrow model2's face
- MOTORWAY 🚌💨
- MOTORWAY 🚌💨
Simple ratio blending is blunt: one number for the whole model. But in a U-Net, different sections do different jobs - the early input blocks chew on structure and layout, the middle block is the compressed bottleneck where the model forms its global understanding, and the output blocks paint the final details back up to full resolution. ModelMergeBlocks is the stock ComfyUI node that lets you mix those regions separately, and this is its Motorway-ed clone.
How per-block merging works
The node walks every weight in model2's diffusion_model and, for each one, finds the block name it belongs to (input, middle, or out) and applies that section's ratio. You get three floats:
input- the encoder side: layout, composition, coarse structure.middle- the bottleneck: the model's overall "what am I looking at" understanding. The most influential knob of the three.out- the decoder side: texture, detail, and finish.
Each defaults to 1.0, and the gotcha is the same as every merge node: leave everything at 1 and you've built model2. The standard pattern is to set all three to a base blend value first (say 0.3 to inject 30% of model2 everywhere), then nudge the individual sections - e.g. raise out if you want model2's texture but keep model1's composition. Because the longest-prefix match does the work, the ratios apply to whole blocks, not individual tensors, which is exactly the granularity people actually use.
It's architecture-agnostic in a way the model-specific merge nodes aren't - it works on any U-Net-shaped checkpoint, which is why it's the one to reach for when there's no dedicated merge node for your model.
The inputs
INPUT_model1_key(defaultmodel1) andINPUT_model2_key(defaultmodel2) - the two models.input,middle,out- the three block ratios, each 0.0–1.0, step 0.01, default 1.0.OUTPUT_MODEL_key(defaultMODEL) - where the merged model lands.
The wrapper keeps the three floats as widgets, turns the models into key strings, and keyed-writes the result. Runtime behavior matches stock ModelMergeBlocks.
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
- Output identical to model2? All ratios default to 1.0 - set a base blend before you fine-tune sections.
- For SDXL/Flux-class models there are dedicated per-block nodes (
ModelMergeSDXL,ModelMergeFlux1, …) with far more granularity; use those when they exist. This node is the generic fallback. '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_editionnodes may be missing from the menu. They're present in the 1.1.0–1.1.6 builds comfy.icu indexed.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — | |
| INPUT_model1_key | STRING | model1 | — |
| INPUT_model2_key | STRING | model2 | — |
| input | FLOAT | 1.000–1 | — |
| middle | FLOAT | 1.000–1 | — |
| out | FLOAT | 1.000–1 | — |
| OUTPUT_MODEL_key | STRING | MODEL | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — |