Advanced CLIP Merge (Tensor Prism)
Blend text encoders without wrecking prompt comprehension
- clip_a
- clip_b
- clip_c
- merged_clip
A checkpoint isn't one network - it's the UNet plus a text encoder (the CLIP part) plus a VAE, bundled together. Most merging tools blend the UNet and call it a day, which is why merged models so often have that "understands the vibe but misses the words" quality. Advanced CLIP Merge (Tensor Prism) is the piece that fixes the other half: it blends two text encoders so the merged checkpoint understands prompts like both parents did.
The name's "Advanced" is doing work. Where a basic CLIP merge is a single ratio over the whole encoder, this node splits the merge by component - the CLIP-L encoder, the CLIP-G encoder, the text projection, the positional embeddings, and the logit scale. That granularity is the difference between a muddy compromise and a CLIP that keeps its semantic sharpness.
How it works
Wire in clip_a and clip_b (optional clip_c for three-way) and pick merge_method: Linear Interpolation, Add Difference, or Weighted Average (a magnitude-based weighting, not a plain ratio). default_ratio (0.5) sets the global blend, and then the component ratios override it:
clip_l_ratio/clip_g_ratio- the two SDXL encoders (CLIP-L and OpenCLIP-G). These do most of the semantic work; SDXL's concept tagging lives here.text_projection_ratio- the projection layer that maps encoder output into the UNet's conditioning space. Getting this wrong is a fast way to break prompt comprehension entirely.positional_embedding_ratio- where token position context lives.logit_scale_ratio- the temperature knob that sets how sharply the encoder discriminates between concepts.
normalize_weights normalizes the blended weights, and delta_factor_a / delta_factor_b scale each parent's contribution to the add-difference math. The single output is merged_clip (a CLIP), which you plug into your CLIPTextEncode in place of the stock encoder.
The settings that matter
For a beginner: set default_ratio, keep the component ratios at the same value, and don't touch anything else. The README's own recommendation is to prefer SLERP-style smooth blending for CLIP because text encoders are hypersensitive to rough interpolation - the "Add Difference" path here is best reserved for when you know you want to transplant one encoder's character. And turn on normalize_weights if your merged output starts producing nonsensical prompts; it keeps the weight distribution in the range the downstream UNet expects.
A word of caution
The 1.7.1 changelog lists "Fixed the Advanced Clip Merge" - so if you're on an older version of the pack and this node misbehaves, update before debugging anything else. Also remember that text encoders are exactly as compatible as their architectures: blending an SDXL CLIP pair is fine, but this node is an SDXL-era tool, not a cross-architecture bridge. If you're merging CLIPs of different vocabularies or dims, nothing here will save you.
Installing it
The pack is ComfyUI-Tensor-Prism-Node-Pack. Via ComfyUI Manager: search "Tensor Prism" → Install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/AstrionX/ComfyUI-Tensor-Prism-Node-Pack
Then restart. No model downloads; deps are torch, numpy, psutil. The README's clone URL is typo'd - use Manager or the URL above.
The trap
CLIP merging is cheap (far lighter than UNet merging) but fragile. Keep ratios conservative and verify that the merged encoder still follows complex prompts before you commit to it. If prompts degrade, lower the ratio toward whichever encoder you trust more - that usually beats adding more knobs.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| clip_a | CLIP | — | |
| clip_b | CLIP | — | |
| merge_method | COMBO | 3 options: Linear Interpolation, Add Difference, Weighted Average | |
| default_ratio | FLOAT | 0.500–1 | — |
| clip_copt | CLIP | — | |
| clip_l_ratioopt | FLOAT | 0.500–1 | — |
| clip_g_ratioopt | FLOAT | 0.500–1 | — |
| text_projection_ratioopt | FLOAT | 0.500–1 | — |
| positional_embedding_ratioopt | FLOAT | 0.500–1 | — |
| logit_scale_ratioopt | FLOAT | 0.500–1 | — |
| normalize_weightsopt | BOOLEAN | false | — |
| delta_factor_aopt | FLOAT | 1.00-2–2 | — |
| delta_factor_bopt | FLOAT | 1.00-2–2 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| merged_clip | CLIP | — |