CLIP Merger (DARE)
DARE-merge the text encoder, not just the UNet
- clip_a
- clip_b
- CLIP
Every checkpoint is actually two models bolted together: the UNet that does the image denoising, and the CLIP text encoder that turns your prompt into conditioning. Most merge tools only touch the UNet and leave the CLIP alone. This node is the exception - it runs the exact same DARE-TIES merge the pack's UNet nodes do, but on two CLIP models instead. Feed it two CLIPs, get one CLIP back, then wire that into your KSampler's positive/negative conditioning inputs.
Why would you bother? Because prompt understanding is its own thing. If you've got a checkpoint whose art you love but whose text encoder fumbles your prompts (or vice versa), the clean fix used to be "swap in a different CLIP at load time." With this node you can blend two text encoders the same way you'd blend two UNets - and because DARE drops deltas randomly, you can roll several variants cheaply and pick the one that reads your prompts best.
How it works
The mechanism is a direct port of the UNet path: it computes delta = clip_b - clip_a, randomly drops drop_rate of those deltas, applies TIES sign-agreement (so you don't flip weights the base already committed to), and optionally rescales what survives. Two details worth knowing:
- It skips the
.position_idsand.logit_scaletensors - those are structural, not something you want sparsified. - There are no block ratios here. UNet merges get six sliders (input/middle/output/etc.) because the UNet has a recognizable block structure; the CLIP is smaller and gets one global knob instead.
The inputs that matter
- clip_a and clip_b - the two text encoders. A is your base.
- ratio (default 1) - the overall strength. Unlike the block-ratio convention elsewhere in the pack (1 = keep A, 0 = keep B), think of this as the blend amount applied on top of the DARE sparsification.
- drop_rate (default 0.9), ties (
sum/count/off), rescale (off/on) - the standard DARE controls, same defaults as the UNet nodes. Leave rescale off, per the author. - seed - stochastic, so fix it for reproducible merges.
- method -
comfy,lerp,slerp, orgradient.comfyis the default and fine.
The output
A single CLIP. It's an in-memory patch, same as the UNet mergers - nothing is written to disk until you route the CLIP (plus a MODEL and VAE) into a Save Checkpoint node. A natural experiment: merge CLIPs with the same seed and drop_rate but different iteration counts, or merge a sharp CLIP with a soft one, and see which combination your prompts actually respond to.
Install and gotchas
ComfyUI Manager (search "DareMerge") or:
cd ComfyUI/custom_nodes
git clone https://github.com/54rt1n/ComfyUI-DareMerge
Restart ComfyUI. Dependencies are just matplotlib, numpy, torch, pillow - no model downloads. This is a niche, experimental pack (the community threads about it are mostly people asking how to use it at all), so budget some patience and a lot of seeds.
One practical note: because the merge is stochastic, the text encoder you get on run one isn't the text encoder you'll get on run two unless the seed is locked. That's fine for a quick A/B, annoying if you're trying to reproduce a result - set the seed, always.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| clip_a | CLIP | — | |
| clip_b | CLIP | — | |
| ties | COMBO | sum | 3 options: sum, count, off |
| rescale | COMBO | off | 2 options: off, on |
| ratio | FLOAT | 1.000–1 | — |
| drop_rate | FLOAT | 0.900–1 | — |
| seed | INT | 42 | — |
| method | COMBO | 4 options: comfy, lerp, slerp, gradient | |
| iterations | INT | 11–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CLIP | CLIP | — |