Unfiltered
PromptingTechnical

Prompt Length and Token Limits: CLIP's 77 Tokens Explained

How long image prompts can be: CLIP's 77-token window, how UIs chunk longer prompts, T5 limits in FLUX, and why order and brevity matter.

By the Unfiltered Image Generator AI editorial team· Updated · 3 min read

Every image model reads your prompt through a text encoder, and encoders have limits.

CLIP: 77 tokens

Stable Diffusion 1.5 and SDXL use CLIP text encoders with a context of 77 tokens, two of which are start and end markers. That leaves 75 for your words, roughly 50-60 words of English.

Chunking

Interfaces such as AUTOMATIC1111, Forge and ComfyUI handle longer prompts by splitting them into 75-token chunks, encoding each separately and concatenating the results. It works, but:

  • Words split across a chunk boundary can lose meaning.
  • Concepts in different chunks interact less.
  • Some interfaces let you insert a BREAK keyword to control where chunks split.

T5 and language-model encoders

FLUX-family models add a T5 encoder that accepts far longer prompts (commonly up to 512 tokens), and models like Qwen-Image use large language-model encoders. Long, detailed prompts are fine there. See FLUX vs SDXL prompting.

Order matters

Earlier tokens tend to have more influence, especially with CLIP. Put subject, medium and key style first; details later. See prompt order matters.

Practical advice

  • SDXL: aim for 30-60 words. Cut filler.
  • FLUX / Qwen-Image: 40-150 words of clear description is fine.
  • Negatives have their own token budget; keep them short. See when to use negative prompts.

Common questions

Is there a prompt length limit in Stable Diffusion?

The CLIP encoder handles 75 usable tokens per chunk. Popular interfaces work around it by encoding several chunks, but each chunk is encoded separately.

How many words is 75 tokens?

Roughly 50-60 English words, fewer with unusual words or heavy punctuation.

Do long prompts work in FLUX?

Yes. FLUX uses a T5 encoder that accepts long prompts, commonly up to 512 tokens depending on the setup.

Related reading

Browse more: all guides · comparisons · glossary · free tools

Turn on the red light.

Open the unfiltered AI image generator and develop the image exactly as you wrote it.