D2 Model and CLIP Merge SDXL
Merge two SDXL models and their CLIPs with one comma-separated list
- model1
- model2
- clip1
- clip2
- MODEL
- CLIP
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.0–8, middle_block.0–2, output_blocks.0–8, 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.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model1 | MODEL | — | |
| model2 | MODEL | — | |
| clip1 | CLIP | — | |
| clip2 | CLIP | — | |
| weights | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CLIP | CLIP | — |