Prompting Techniques for Stable Diffusion
From the course Stable Diffusion Mastery: Local AI Image Generation
Prompting for Stable Diffusion is different from prompting language models. Image generation prompts are more like descriptive tags than conversational requests. Mastering this syntax is key to getting consistent, high-quality results.
Basic Prompt Structure
A good SD prompt follows this pattern:
Subject + Medium + Style + Quality + Details
Example: "portrait of a young woman, oil painting, impressionist style, masterpiece, best quality, soft lighting, garden background, detailed eyes"
Positive Prompts
Build your prompt in layers:
- Subject — What is the image about? "a cyberpunk city skyline"
- Medium — What type of art? "digital painting, concept art, 3D render, photograph"
- Style — What aesthetic? "art nouveau, studio ghibli style, hyperrealistic, cinematic"
- Quality boosters — "masterpiece, best quality, highly detailed, sharp focus, 8k"
- Lighting — "golden hour, studio lighting, dramatic shadows, volumetric fog"
- Camera — "wide angle, close-up, bird's eye view, 85mm lens, shallow depth of field"
Negative Prompts
Equally important — tell the model what to avoid:
Standard negative prompt: "worst quality, low quality, blurry, deformed, ugly, bad anatomy, bad hands, extra fingers, missing fingers, extra limbs, disfigured, watermark, text, signature, cropped"
For realistic images add: "cartoon, anime, illustration, painting, drawing, 3d render"
For anime/art add: "photograph, realistic, photorealistic, 3d, ugly, deformed"
Prompt Weighting
Control emphasis with parentheses and numbers:
- (red hair:1.3) — Emphasize red hair (1.0 = normal, higher = stronger)
- (blurry:0.5) — De-emphasize blurriness
- ((important detail)) — Double parentheses ≈ 1.1× weight per pair
- [less important] — Square brackets reduce weight
BREAK Keyword
Use BREAK to separate prompt concepts and avoid blending:
"cyberpunk city, neon lights, rain BREAK portrait of a woman, leather jacket, short hair"
This prevents the model from mixing unrelated concepts.
Prompt Scheduling
In ComfyUI, you can change prompts at different steps:
- Early steps (1-5) define composition and overall layout
- Middle steps (5-15) add details and refine shapes
- Late steps (15-20) handle fine details and sharpness
Practical Examples
Realistic Portrait: "professional headshot photograph of a 30-year-old man, business attire, confident expression, studio lighting, gray background, sharp focus, 85mm lens, f/2.8, high resolution"
Negative: "cartoon, painting, deformed, ugly, bad quality, blurry"
Fantasy Landscape: "epic fantasy landscape, floating islands, waterfalls, lush vegetation, dramatic clouds, golden hour lighting, digital painting, concept art, masterpiece, best quality, highly detailed, 4k"
Negative: "blurry, low quality, text, watermark, signature, realistic, photograph"
Product Shot: "minimalist product photography, glass perfume bottle, white marble surface, soft studio lighting, clean background, commercial quality, sharp focus, high key lighting"
Negative: "cluttered, messy, dark, low quality, text, watermark"
The best way to improve your prompts is to study what works. Use CivitAI's image feed to find images you like and examine their prompts, settings, and models.
Key Takeaways
- •SD prompts follow: Subject + Medium + Style + Quality + Details
- •Negative prompts are equally important — specify what to avoid
- •Use prompt weighting with parentheses and numbers to control emphasis
- •BREAK keyword separates concepts to prevent unwanted blending
- •Study successful prompts on CivitAI to learn what works
Progress is kept in this browser only.