Prompt
last edited
A prompt is the text (or image) input that conditions a generation, and it is the primary creative interface of generative art. The model does not read a prompt as a human would. The text encoder converts it into embeddings, and the encoder's vocabulary and biases limit what the words can do. Encoders differ by model family, and CLIP-style encoders are only one design.
Prompt construction
The Diffusers guide advises writing a structured narrative covering subject, style and context instead of a keyword list. Modern models understand language better than keyword matching allows. Style references such as "35mm photo" or "ukiyo-e woodblock" still steer the look of an image. A negative prompt lists what the model should avoid.
Emphasis syntax such as `(cat:1.5)` raises the pull of a phrase. In Diffusers it is applied through `prompt_embeds` with the sd_embed or Compel libraries, not by plain string parsing. The guide notes that this emphasis does not always help on Flux-class models.
Guidance and iteration
CFG controls how literally the model follows a prompt, but its meaning varies by checkpoint. For Qwen-Image and Flux, the guide sets classic CFG with a separate scale plus a negative prompt. The `guidance_scale` value on those models is distilled or embedded guidance, which is a different mechanism.
Holding the seed fixed while changing one phrase at a time shows what each word contributes. This is a fast way to learn a new model. Image prompts extend the idea beyond text. Reference images passed through IP-Adapter or img2img condition generation on visual content directly. See core techniques for more.
Sources
- Diffusers prompt guide covering Compel, Flux and Qwen-Image: prompt structure, embedding-based emphasis, and separate CFG scales for these models.
- CLIP paper, Learning Transferable Visual Models From Natural Language Supervision: contrastive text-image pre-training for zero-shot transfer and classification.