Nodes/D2 Nodes ComfyUI/D2 Model and CLIP Merge SDXL
ComfyUI Node

D2 Model and CLIP Merge SDXL

Merge two SDXL models and their CLIPs with one comma-separated list

By da2el-ai·Created 2 years ago·Updated about a month ago· 66
D2 Model and CLIP Merge SDXL
  • model1
  • model2
  • clip1
  • clip2
  • MODEL
  • CLIP
weights

Model merging is how a lot of the SDXL ecosystem actually gets made - blend two checkpoints at per-block weights and you get a third model with the strengths of both. D2 Model and CLIP Merge SDXL packages ComfyUI's ModelMergeSDXL and CLIPMergeSimple into one node: give it two models, two CLIPs, and a comma-separated list of block weights, and it outputs the merged MODEL and CLIP together.

The "one comma-separated list" part is what makes it worth using over the two stock nodes. The weights string maps to the SDXL structure in order: time_embed, label_emb, input_blocks.08, middle_block.02, output_blocks.08, out. The author's own docs show a typical 25-value sweep like 0.85,0.85,1,1,0.4,... - the kind of thing you'd otherwise be typing into 25 separate widgets. You can even put one extra value at the end to set the CLIP merge ratio; anything you leave out defaults to 0.5.

The inputs

  • model1 / model2 - the two SDXL models to merge.
  • clip1 / clip2 - the matching text encoders.
  • weights - comma-separated block weights in the order above. Missing values default to 0.5, and non-numeric entries are treated as 0.5 too.

Outputs

  • MODEL - the block-merged model.
  • CLIP - the CLIP merged at the ratio from the tail of the weights list (or 0.5).

Installing it

ComfyUI Manager → search "D2-nodes-ComfyUI" → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/da2el-ai/D2-nodes-ComfyUI

Restart. No model downloads, deps are piexif and charset-normalizer. Since v32.0.0 the pack needs a recent ComfyUI (V3 schema).

Where people get burned

The name says SDXL, and it means it: this merges SDXL-structure models. If you feed it two SD 1.5 checkpoints, the block order won't match what's inside and you'll get garbage or an error. Also - and this is the classic merge trap - the two input models should be built on the same architecture and same base; merging a v-prediction model into an eps model without handling the sampling difference is a recipe for artifacts (KB context: NoobAI's vpred variant is a separate case from standard eps fine-tunes). And the silent 0.5 default for untyped weights means a typo in your list can quietly flatten a block's influence - read the list against the order above before you run it.

CategoryD2/Merge

Inputs (5)

NameTypeDefaultDescription
model1MODEL
model2MODEL
clip1CLIP
clip2CLIP
weightsSTRING

Outputs (2)

NameTypeDescription
MODELMODEL
CLIPCLIP