Nodes/braintacles-nodes/CLIPTextEncodeSDXL-Multi-IO
ComfyUI Node

CLIPTextEncodeSDXL-Multi-IO

Four CLIP encoders, one prompt — compare LoRAs without the spaghetti

By braintacles·Created 3 years ago·Updated 2 years ago· 2
CLIPTextEncodeSDXL-Multi-IO
  • clip
  • clip2
  • clip3
  • clip4
  • latent
  • CONDITIONING
  • CONDITIONING
  • CONDITIONING
  • CONDITIONING
  • LATENT
text_gCLIP_G
text_lCLIP_L

SDXL doesn't use one text encoder, it uses two - CLIP-G and CLIP-L - and the core CLIPTextEncodeSDXL node wires them up for you. CLIPTextEncodeSDXL-Multi-IO from the braintacles pack is that same node with up to four CLIP inputs and four CONDITIONING outputs, built for one specific situation: comparing CLIPs, CLIP-skip settings, or LoRA-tweaked text encoders against each other without rebuilding the encode half of your graph four times.

How it works

It does the standard SDXL encode. text_g goes into the "g" token stream, text_l into the "l" stream, and both get padded to equal length so the two encoders see the same amount of text. Each conditioning output carries the pooled output plus width/height. If you feed it a latent, it takes the resolution from there - latent size times 8 - otherwise it assumes 1024×1024. That matters because SDXL conditioning is resolution-aware; the encode has to know what size image it's describing.

Inputs: clip, text_g, text_l (multiline, defaults "CLIP_G"/"CLIP_L" so you can't mix up the boxes), then optional clip2, clip3, clip4, and latent.

The gotcha in the outputs

Four CONDITIONING outputs plus a latent pass-through. Here's the thing: outputs 2, 3 and 4 are exact duplicates of output 1 unless you plug clip2, clip3 or clip4 in. The node always emits four conditionings; it only makes them different when you give it a different CLIP. A one-CLIP setup gives you four copies of the same conditioning - harmless, but baffling if you expected four distinct encodings to appear from thin air.

How you'd actually use it

Load the same checkpoint through different CLIP configurations, or attach a LoRA to the model feeding clip2, then send outputs 1 and 2 into a ConditioningCombine or two separate samplers and eyeball the difference. It's a comparison tool dressed up as an encoder. The latent output is a pure pass-through so you don't have to re-route the latent from elsewhere.

Two limits worth knowing. It's SDXL-only by construction - CLIP-G and CLIP-L are the SDXL pair, so this does nothing for SD 1.5 or for the T5/LLM encoders on Flux-class models. And if you're not juggling multiple CLIPs, the plain core node is less machinery for the same result. This one earns its place only when the comparison is the job.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/braintacles/braintacles-comfyui-nodes

or search braintacles-nodes in ComfyUI Manager and restart. It's a single-file pack with no Python dependencies and no model downloads - it only calls ComfyUI's own CLIP encode APIs.

Categorybraintacles/conditioning

Inputs (7)

NameTypeDefaultDescription
clipCLIP
text_gSTRINGCLIP_G
text_lSTRINGCLIP_L
clip2optCLIP
clip3optCLIP
clip4optCLIP
latentoptLATENT

Outputs (5)

NameTypeDescription
CONDITIONINGCONDITIONING
CONDITIONINGCONDITIONING
CONDITIONINGCONDITIONING
CONDITIONINGCONDITIONING
LATENTLATENT