AI · Prompt Architecture

Prompts for SDXL

CLIP thinks in lists — order, weighting, and the negative prompt as an active control instrument.

CLIP thinks in lists

SDXL works exclusively with CLIP encoders. What that means was covered in the previous article — here it's about the practical consequences: how do you build an SDXL prompt that reliably controls the model?

The basic form is a comma-separated list of concepts. No complete sentences, no relative clauses, no prepositional phrases. CLIP doesn't read grammar — it reads concepts.

woman in long coat, wet cobblestone street, night,
streetlight glow, dramatic rim light, fog,
glossy wet reflections, leather coat texture,
moody atmosphere, photorealistic

This isn't poor writing. This is the right language for this encoder.

Order is weighting

With CLIP, what comes first counts more. Earlier tokens are weighted more heavily than later ones — not dramatically, but measurably. This has a direct consequence for your structure: what you really want to see goes first.

A sensible order follows the 8 categories from the foundation article — but not all of them always need content, and the order within your prompt should reflect your own priorities:

[Subject] → [Composition/Shot] → [Environment] → [Light] →
[Material] → [Atmosphere] → [Style] → [Technique]

Practical example for an interior shot:

Scandinavian kitchen interior,                    ← Subject
eye level shot, wide angle,                       ← Composition
floor-to-ceiling windows, open plan,              ← Environment
soft natural daylight, morning light from left,   ← Light
matte white upper cabinets, light oak lower       ← Material
cabinets and island, gray stone countertops,
bright and airy, warm,                            ← Atmosphere
editorial photography, Architectural Digest,      ← Style
35mm lens, shallow depth of field                 ← Technique

Weighting syntax

CLIP understands explicit token weighting. The syntax in ComfyUI and most SDXL interfaces:

(word:1.3) weight up, factor 1.3
(word:0.8) weight down, factor 0.8
[word] slight reduction (equivalent to approx. 0.9)

Sensible range: 0.7 to 1.4. Above that the result becomes unstable — the model overweights the token at the expense of everything else.

Weighting is the most important control instrument in SDXL because it's the only one that goes beyond order. If an element in the result appears too weakly even though it's in the prompt: check order first, then increase weighting.

Practical example: the element "floor-to-ceiling windows" wasn't rendered in the first kitchen test. With weighting:

(floor-to-ceiling windows:1.4), open plan kitchen,
soft natural daylight flooding in

This is a test worth running — and its result directly shows how much influence explicit weighting has on a single element.

Two materials need an assignment

A common source of errors: when two materials or two objects from the same category appear in the prompt without their spatial relationship being described, the model decides for itself how to distribute them in the image.

matte white cabinetry, light oak wood fronts

The model sees: two materials, both for kitchen cabinets. Plausible solution: one side white, one side oak. Not wrong — but probably not what you intended.

With explicit assignment:

matte white upper cabinets, light oak wood lower cabinets
and island

Now each material has a defined place. The model doesn't have to interpret.

This rule applies beyond interiors: for light sources ("warm key light from left, cool fill from right"), for people in the image, for objects with spatial relationships. Whenever two elements from the same category appear — make the relationship explicit.

The negative prompt

With SDXL, the negative prompt is an actively used control instrument — unlike Flux, where it barely works. It describes what the model should not generate.

From the SD1.5 era comes the habit of working with very long negative prompts — lists of 30 or 40 entries as a universal template. This is counterproductive with Juggernaut XL: the model is already heavily trained toward quality, and an overloaded negative prompt consumes token budget and constrains the model more than it helps.

A compact, functional starting point for photorealistic shots:

blurry, low quality, deformed, bad anatomy,
watermark, text, oversaturated, cartoon

From here, only add entries when a specific problem appears in the result — not prophylactically.

What doesn't work in SDXL

Full sentences

"A woman walks across a wet cobblestone street at night" — CLIP reads this as "woman", "walks", "wet", "cobblestone", "street", "night" as individual tokens. The syntactic relationship is lost. The result is often still usable, but you're giving up precision. Better: keyword list.

Overly long negative prompts

More than 10–12 entries in the negative prompt start restricting the result rather than improving it. CLIP token budget is limited; an overly long negative prompt "displaces" positive content.

The complete SDXL workflow at a glance

Positive prompt:
[Subject, Composition, Environment, Light, Material,
Atmosphere, Style, Technique] — comma-separated, priority
determines order, weighting where needed

Negative prompt:
Compact, 6–10 entries, only exclude real problems

KSampler values for Juggernaut XL:
cfg: 4–5 · steps: 30 · sampler: dpmpp_2m · scheduler: karras

How long can a prompt be?

The token limit isn't set by the model, but by the encoder. CLIP has a hard limit of 77 tokens per prompt — anything beyond that isn't processed worse, it's simply ignored.

Tokens aren't the same as words. Rule of thumb: 1 word ≈ 1–2 tokens. Short, common words ("fog", "night", "soft") cost 1 token. Longer or compound terms ("cobblestone", "photorealistic") cost 2–3. Numbers and special characters also cost more.

Positive and negative prompts each have their own 77-token budget — they don't share the limit.

ComfyUI shows you the current token count live in the text field of the CLIPTextEncode node. That way you can see immediately whether you're within budget.

For longer prompts there's an extension option: the CLIPSetLastLayer node or the token merging setting in ComfyUI allows raising the limit to 154 or 231 tokens by combining multiple CLIP passes. Juggernaut XL supports this. For most tasks it isn't necessary — but good to know when a prompt is systematically being cut off at the end.

With Flux: The clip_l field has the same 77-token limit. The t5xxl field, however, processes up to ~512 tokens — full sentences are no problem there.