SDXL Base Prompt Encoder (Searge)
Dual-CLIP conditioning for the base model only
- base_clip
- base_positive
- base_negative
This is the base-only prompt encoder for Searge SDXL. It turns your positive and negative prompts into conditioning for the SDXL base model - using both of the base's text encoders - and stops there. No refiner outputs. If you're not running a refiner (which, these days, is most people), this is the leaner, correct choice over the full base+refiner encoder.
It sits under Searge/_deprecated_/ClipEncoding, part of the older toolkit, but it's a clean illustration of how SDXL conditioning actually works. SDXL's base has two text encoders - OpenCLIP bigG and CLIP-L - and this node feeds both, plus SDXL's size/crop micro-conditioning.
How it works
SDXL reads two prompt streams on the base. Searge splits yours into pos_g (the "global" prompt for bigG) and pos_l (the "local" prompt for CLIP-L), with neg_g/neg_l on the negative side. Putting the same text in both is a perfectly good starting point; the split just lets you steer composition and detail separately if you want to.
Alongside the text, SDXL conditions on an "original size," a crop offset, and a "target size." The node's base_width/base_height/target_width/target_height default to 4096 with crops at 0 - Searge deliberately sets these high, a known nudge toward cleaner, higher-perceived-resolution output. Leave them unless you specifically understand what you're steering.
The inputs and outputs that matter
Required: base_clip (from your loaded SDXL checkpoint). The fields you write into:
- pos_g / pos_l - your positive prompt for the two base encoders. Same text in both to start.
- neg_g / neg_l - your negative prompt. Keep it short - SDXL does worse with the SD 1.5 wall-of-negatives habit.
The size/crop fields have sensible defaults. Outputs are two conditioning wires - base_positive and base_negative - which go into the base sampler.
Base-only vs the full encoder
Simple rule: if you have a refiner in play, use SeargeSDXLPromptEncoder (which also emits refiner conditioning). If you don't - and the refiner is genuinely optional; the community largely dropped it once fine-tuned checkpoints matured - this base-only encoder is cleaner, with fewer sockets to leave dangling. On a modern SDXL finetune running base-only, this is the one you want.
How to install it
ComfyUI Manager: search SeargeSDXL, install, restart. Manual: python -m pip install opencv-python in ComfyUI's Python env (required), then cd ComfyUI/custom_nodes && git clone https://github.com/SeargeDP/SeargeSDXL.git, restart. Windows portable has an installer script.
No model for the node itself, but it needs the base CLIP - i.e. an SDXL base checkpoint loaded in the graph.
Where people get burned
- Over-stuffing negatives. SDXL rewards concise negative prompts. Dumping a huge "bad hands, extra fingers, watermark…" block in
neg_g/neg_lis an SD 1.5 reflex that tends to hurt SDXL output. - Randomizing the size fields. The 4096 defaults are intentional. Odd values there can quietly distort composition - change them only with a reason.
- Using base-only when you meant to refine. If you actually have a refiner loaded and wired, this node won't produce refiner conditioning - reach for the full SeargeSDXLPromptEncoder instead.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| base_clip | CLIP | — | |
| pos_g | STRING | POS_G | — |
| pos_l | STRING | POS_L | — |
| neg_g | STRING | NEG_G | — |
| neg_l | STRING | NEG_L | — |
| base_width | INT | 40960–16384 | — |
| base_height | INT | 40960–16384 | — |
| crop_w | INT | 00–16384 | — |
| crop_h | INT | 00–16384 | — |
| target_width | INT | 40960–16384 | — |
| target_height | INT | 40960–16384 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| base_positive | CONDITIONING | — |
| base_negative | CONDITIONING | — |