RookieUI A1111 CLIP Text Encode SDXL
A1111 prompt parity for SDXL's dual encoder
- clip
- CONDITIONING
This is the SDXL version of RookieUI's A1111 prompt encoder - same goal, but it deals with the thing that makes SDXL prompting weirder than SD1.5: two text encoders. SDXL runs CLIP-L and CLIP-G side by side, plus a set of size-conditioning values, and getting an image to match its Automatic1111 counterpart means feeding both channels the way the WebUI does. RookieUI is an A1111-style sidebar for ComfyUI, and this node is how it keeps SDXL (and its whole lineage - Pony, Illustrious, NoobAI) parsing prompts like A1111 rather than like stock ComfyUI.
How it works
The node takes a clip and compiles your prompt into CONDITIONING, but SDXL splits the prompt across two channels. text_g goes to CLIP-G (the bigger encoder, better with natural-language descriptions) and text_l goes to CLIP-L (better with tag-style prompts). The common move is to put your full prompt in both, or natural language in g and booru-style tags in l. On top of that, SDXL conditions on image dimensions - width, height, target_width, target_height, and the crop_w / crop_h offsets - which the model uses as part of its understanding of the frame.
All the A1111 grammar from the SD1.5 encoder carries over: attention markers, BREAK, AND, scheduling, alternation, and textual-inversion resolution, this time with SDXL's clip_g / clip_l embedding channels handled separately. Output wires into your KSampler.
The inputs that matter
text_gandtext_l- your two prompt channels. Start by putting the same prompt in both; split into natural-language-in-g / tags-in-l only if you know you want that.width/height- set these to your actual generation resolution (default 1024×1024). SDXL genuinely uses them; mismatched values shift composition.parser(A1111/full/comfy++/fixed attention) - leave onA1111. Same as the SD1.5 node, this is the setting that reproduces the WebUI, andmean_normalization(default true) is what makes the emphasis math line up.
The target_width / target_height and crop_w / crop_h values are the SDXL size-conditioning knobs - leave target at your output size and crops at 0 unless you're deliberately faking a crop. The optional block (steps, a1111_engine, embedding_directory, embedding_names, use_old_emphasis_implementation) behaves exactly like the SD1.5 encoder's.
How to install it
Via ComfyUI Manager: search ComfyUI-RookieUI, install, restart. Manually, from your ComfyUI root:
cd ComfyUI/custom_nodes
git clone https://github.com/rookiestar28/ComfyUI-RookieUI
cd ComfyUI-RookieUI
python -m pip install -r requirements.txt
Then restart ComfyUI.
Common issues
A quick myth-buster while you're here: don't reach for CLIP skip to "fix" SDXL output. SDXL already conditions on the penultimate CLIP layer by default - it's effectively running what A1111 calls CLIP skip 2 before you touch anything - so setting 2 mostly restates the default, and setting 1 is what turns Pony into noise. The advice to "set CLIP skip 2" on these models is really advice not to set it to 1. This node isn't where you'd change that anyway; the point is not to chase it as a quality dial.
Embeddings are the other gotcha. An SDXL-lineage textual inversion won't cross to SD1.5 and vice versa, and Pony's embedding space is opinionated enough that vectors trained on base SDXL or Illustrious often don't transfer cleanly even within the family. Match the embedding to the base model its page names. If one does nothing, that's almost always an architecture mismatch, not a bug in the encoder - rename the file or pull it out of the folder and regenerate on a fixed seed to confirm.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| width | INT | 10240–16384 | — |
| height | INT | 10240–16384 | — |
| crop_w | INT | 00–16384 | — |
| crop_h | INT | 00–16384 | — |
| target_width | INT | 10240–16384 | — |
| target_height | INT | 10240–16384 | — |
| text_g | STRING | — | |
| text_l | STRING | — | |
| stepsopt | INT | 101–10000 | — |
| a1111_engineopt | COMBO | 3 options: parity, text_only, legacy | |
| parseropt | COMBO | 4 options: A1111, full, comfy++, fixed attention | |
| embedding_directoryopt | STRING | — | |
| embedding_namesopt | STRING | — | |
| mean_normalizationopt | BOOLEAN | true | — |
| use_old_emphasis_implementationopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |