Nodes/ComfyUI_agilly1989_motorway/CLIPMergeSimple_motorway_edition
ComfyUI Node

CLIPMergeSimple_motorway_edition

The ratio-based text encoder blend

By agilly1989·Created 2 years ago·Updated about a year ago· 7
CLIPMergeSimple_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
INPUT_clip1_keyclip1
INPUT_clip2_keyclip2
ratio1.00
OUTPUT_CLIP_keyCLIP

If the idea of merging two text encoders sounds exotic, fair - but the mechanism is the same interpolation you use when you merge two checkpoints. CLIPMergeSimple takes CLIP A and CLIP B and blends them by a ratio you pick, so 0.5 gives you exactly half of each. This is the Motorway-ed version: both CLIPs come out of the Motorway by key, the ratio is a plain slider, and the blended result goes back into the Motorway under a key you name.

Of the three CLIP-merge nodes in core ComfyUI, this is the one you'll actually use if you use any. The ratio gives you continuous control, which is exactly what experiments want: start at 1.0 (pure A) and walk the slider down toward B while you watch what the prompt encoder does to your outputs. CLIPMergeAdd is the blunt "add B onto A" version and CLIPMergeSubtract is for removing a scaled amount; Simple is the dial.

How it works

The wrapper pulls two things out of the Motorway and writes one back:

  • INPUT_clip1_key - key for the first CLIP (default clip1)
  • INPUT_clip2_key - key for the second CLIP (default clip2)
  • ratio - the blend, default 1.0, range 0–1. 1.0 is all CLIP1; 0.0 would be all CLIP2.
  • OUTPUT_CLIP_key - where the blended CLIP goes, default CLIP

Under the hood it instantiates the real core CLIPMergeSimple, feeds it the two CLIPs from those keys plus your ratio, and stores the result under the output key. The only visible output is the MOTORWAY 🚌💨 - downstream, your text-encode nodes read the CLIP key and encode with the blend.

A couple of practical notes. The two source CLIPs should be the same architecture - blending an SDXL CLIP with an SD 1.5 one is asking for nonsense, because the merged weights won't be shaped for either encoder. And the merged CLIP is a live object in memory, not a file; if you want to keep the blend, you pair this with CLIPSave (also available as a Motorway-ed node) to write it to models/clip.

Motorway specifics

MOTORWAY 🚌💨 is required. The defaults assume your chain stored the sources under clip1 and clip2; if your loaders used the pack's other convention (CLIP), update the fields - a key that was never written throws the signature 'MotorwayClass' object has no attribute 'hash_' error. Keys overwrite as they flow down the chain, so don't write the blend over a source you still need.

Install

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

Restart, or find "ComfyUI_agilly1989_motorway" in ComfyUI Manager. No pip dependencies, no model downloads.

Fine print

The pack is an explicitly-beta side project - README opens "BIG BROKEN WITH ASYNC WILL FIX WHEN I GET THE TIME/MOTIVATION" - and the current hotfix release has the _motorway_edition clone generation commented out of __init__.py, so on the newest main these nodes may not load at all. A workflow referencing them that comes up with missing nodes is hitting exactly that. GitHub issues are the way; the author has said his Discord DMs get ignored.

Categoryagilly1989 Nodes/Motorway-ed/advanced/model_merging

Inputs (5)

NameTypeDefaultDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨
INPUT_clip1_keySTRINGclip1
INPUT_clip2_keySTRINGclip2
ratioFLOAT1.000–1
OUTPUT_CLIP_keySTRINGCLIP

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨