Nodes/Nukun_ComfyUI_Nodes/Conditioning SDXL Merge CLIP G/L (Nukun)
ComfyUI Node

Conditioning SDXL Merge CLIP G/L (Nukun)

Reunite SDXL's two text encoders in one conditioning

By OnekoSL·Created 3 months ago·Updated 11 days ago· 1
Conditioning SDXL Merge CLIP G/L (Nukun)
  • cond_clip_l
  • cond_clip_g
  • conditioning

SDXL is the two-encoder model: a big CLIP-G (OpenCLIP ViT-bigG, the one with the semantic heft) and a small CLIP-L (the ViT-L, closer to classic SD1.5 text). Normal SDXL workflows encode your prompt with both and ComfyUI merges them for you. But when you're doing conditional work - regional prompting, blending, any node that wants to operate on conditioning math - you sometimes end up holding the two streams separately, and then you need a way to put them back together.

NukunConditioningSDXLMergeClipGL is that glue. It takes the separate CLIP-G and CLIP-L conditionings and merges them into the single combined conditioning the sampler expects.

How it works

It's a narrow, mechanical node. Two inputs:

  • cond_clip_l - the CLIP-L conditioning.
  • cond_clip_g - the CLIP-G conditioning.

The node takes the first 768 channels of the CLIP-L conditioning and merges them into the CLIP-G conditioning - that's the layout SDXL uses internally (CLIP-L contributes its 768 channels, CLIP-G contributes its own alongside). One output, conditioning, which is what the sampler wants.

When you actually need this

Stock ComfyUI handles the G/L merge invisibly - CLIPTextEncode with an SDXL CLIP object does both encoders and merges. So this node only earns its place in workflows where the two streams got separated upstream:

  • Custom text encoding chains. If you're using a node that encodes CLIP-G and CLIP-L separately (some regional or sculpting setups do), you need a merge step before the sampler.
  • Conditioning math on one stream. You slerped or adjusted the G conditioning, or swapped in a different G, and now you want to recombine it with the untouched L conditioning.
  • CLIP sculpt-style edits that target a specific encoder's tokens.

If you're doing neither of those, you don't need this node - the built-in encode is doing the merge for you and adding a manual merge on top of an already-merged conditioning is a mistake, not an upgrade.

Where it sits in the pack

It's one of four companion conditioning nodes the author built alongside CLIP Sculpt Text Encode - the slerp, average-keep-magnitude, and normalize-to-empty nodes you'll find in the same pack. The pattern is coherent: the pack assumes you sometimes want to do geometry on conditionings, and it gives you the operators to do it plus the merge node to stitch things back together for the sampler.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/OnekoSL/Nukun_ComfyUI_Nodes.git

Restart ComfyUI or install via ComfyUI Manager ("Nukun").

The honest check before you use it

Ask yourself whether you actually have two separate streams in front of you. If you're looking at a single CONDITIONING from a normal CLIPTextEncode, this node has nothing to do - you're already merged. If you do have separate L and G outputs, verify they're both SDXL-family conditionings of compatible shapes, or the merge will be noise. Used in the right spot, it's a five-second fix that would otherwise mean re-architecting the graph.

CategoryNukun/Conditioning

Inputs (2)

NameTypeDefaultDescription
cond_clip_lCONDITIONING
cond_clip_gCONDITIONING

Outputs (1)

NameTypeDescription
conditioningCONDITIONING