Nodes/SeargeSDXL/SDXL Base Prompt Encoder (Searge)
ComfyUI Node Runs on cloud

SDXL Base Prompt Encoder (Searge)

Dual-CLIP conditioning for the base model only

By SeargeDP·Created 3 years ago·Updated 2 years ago· 874
SDXL Base Prompt Encoder (Searge)
  • base_clip
  • base_positive
  • base_negative
pos_gPOS_G
pos_lPOS_L
neg_gNEG_G
neg_lNEG_L
base_width4096
base_height4096
crop_w0
crop_h0
target_width4096
target_height4096

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_l is 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.
CategorySearge/_deprecated_/ClipEncoding

Inputs (11)

NameTypeDefaultDescription
base_clipCLIP
pos_gSTRINGPOS_G
pos_lSTRINGPOS_L
neg_gSTRINGNEG_G
neg_lSTRINGNEG_L
base_widthINT40960–16384
base_heightINT40960–16384
crop_wINT00–16384
crop_hINT00–16384
target_widthINT40960–16384
target_heightINT40960–16384

Outputs (2)

NameTypeDescription
base_positiveCONDITIONING
base_negativeCONDITIONING