Conditioning SDXL merge clip_g / clip_l
SDXL has two prompt brains. This node lets you swap one.
- cond_clip_l
- cond_clip_g
- CONDITIONING
Here's a fact about SDXL that most workflows quietly hide from you: your prompt gets encoded twice, by two different text encoders, and the results are stitched into one long conditioning vector. CLIP-L (768 dimensions) and OpenCLIP-G (1280 dimensions) both read the same words and see slightly different things. ComfyUI concatenates them into a 2048-dimension vector - clip_l first, then clip_g - and the sampler reads the whole thing as one prompt.
This node from the Vector Sculptor pack lets you take those two halves apart and put them back together from different sources. Give it one conditioning for cond_clip_l and another for cond_clip_g, and the output is a fresh conditioning whose clip_l half came from the first input and whose clip_g half came from the second.
Why you'd bother
The community shorthand, which is a shortcut and not a law, is that clip_g carries the concept - the big-picture "what this is" - while clip_l carries the finer detail. When that's true, this node is a way to remix two prompt encodings: keep the concept from one prompt and the detail from another without rewriting either. It also pairs naturally with the pack's own CLIP Vector Sculptor text encode, since that node sculpts token vectors and you might want only one half of its output spliced in.
The mechanism is dead simple under the hood. Stock ComfyUI (comfy/sdxl_clip.py) builds SDXL conditioning as torch.cat([l_out, g_out], dim=-1) - clip_l's 768 dims first, clip_g's 1280 after. The node copies cond_clip_l's first 768 dimensions into cond_clip_g's first 768 dimensions and returns cond_clip_g, so the clip_g half of the result is untouched while the clip_l half comes entirely from the other input. If the two conditionings have different token counts it trims to the shorter one rather than erroring.
Inputs and output
- cond_clip_l - a
CONDITIONING; its clip_l half ends up in the result. - cond_clip_g - a
CONDITIONING; its clip_g half survives, and it's the shape the output inherits.
Output is a single CONDITIONING that feeds straight into the sampler, same as any other.
Installing and getting it right
Same story as every node in this pack - it ships together, so:
cd ComfyUI/custom_nodes
git clone https://github.com/Extraltodeus/Vector_Sculptor_ComfyUI
then restart. No extra dependencies, no model downloads.
The gotcha is the word "SDXL" in the name, and it means it. This node is only meaningful on SDXL-family models where the 2048-dim dual-encoder layout exists. Feed it two SD 1.5 conditionings (768-dim) and the copy just replaces the whole tensor, so it degrades into "use cond_clip_l, ignore cond_clip_g." On Flux and the LLM-encoded models there's no clip_g at all and the node is pointless. Keep both inputs from the same checkpoint - mixing a Pony conditioning with a base-SDXL one is exactly the kind of thing that makes a sampler cough. It's a small utility, but when you need to swap one of SDXL's two brains it's the only node I know that does it without a custom encoder path.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| cond_clip_l | CONDITIONING | — | |
| cond_clip_g | CONDITIONING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |