Ai-tools

Stable Diffusion Prompt Engineering — What Actually Works

Published 2026-07-20 ~443 words Tags: stable-diffusion, prompting, comfyui, ai-art

Good prompts aren't about more words — they're about the right structure. Here's what actually makes a difference in practice.

The Anatomy of a Good Prompt

[Subject], [details], [environment], [lighting], [style], [quality markers]
Example:
a cyberpunk hacker, neon dreadlocks, rainy alley, volumetric lighting,
digital art, masterpiece, best quality, detailed face

Order matters. Stable Diffusion reads prompts left-to-right with decreasing weight. Put the most important thing first — the subject, not the style.

Keyword Weighting

In Automatic1111 / ComfyUI, use () and [] to adjust weight:

(laughing:1.3)     ←  30% stronger
(laughing:0.7)     ←  30% weaker
[laughing]         ←  ~10% weaker (shorthand)
(laughing)         ←  ~10% stronger (shorthand)

Don't overdo it. Weights above 1.5 cause artifacts — blown out colors, distorted anatomy. The sweet spot is 1.1-1.3.

Stacking: ((laughing)) = roughly 1.21x. Three parens starts to break things.

Negative Prompts That Work

ugly, tiling, poorly drawn, out of frame, disfigured, deformed, body out of frame,
bad anatomy, watermark, signature, cut off, low contrast, underexposed,
overexposed, bad art, beginner, amateur, distorted face, blurry, draft, grainy

For photorealism, also add:

illustration, cartoon, 3d render, painting, digital art, bokeh, depth of field

Style Modifiers

Photography:

  • Cinematic: cinematic lighting, shot on 35mm, film grain, anamorphic
  • Portrait: portrait photography, soft lighting, shallow depth of field
  • Street: street photography, candid, natural lighting

Art:

  • Oil painting: oil on canvas, impasto, visible brushstrokes
  • Concept art: concept art, matte painting, dramatic lighting
  • Anime: anime style, cel shaded, line art

Vibe:

  • moody, dark, ominous vs bright, cheerful, sunny
  • minimalist, clean, simple vs intricate, detailed, complex

Resolution Tips

Generate at the model's native resolution:

  • SD1.5: 512x512 (or 512x768 for portraits)
  • SDXL: 1024x1024 (or 1024x1536 for portraits)

Hires fix in ComfyUI: generate at low res first, then upscale 1.5-2x with a separate upscale pass. This preserves composition while adding detail.

Batch Prompting

ComfyUI and Auto1111 both support batch prompting with [option1|option2]:

a [cyberpunk|fantasy|sci-fi] warrior, [blonde|red|blue] hair

This generates 9 images (3×3) with all combinations.

Common Pitfalls

Too many concepts. A prompt like "a cat wearing a hat drinking coffee while reading a newspaper in a spaceship" forces the model to split attention across too many elements. You'll get a mess. Stick to 1-3 main elements.

Contradictory qualifiers. "beautiful detailed face, blurred face" confuses the model. Keep negatives in the negative prompt.

Overspecifying. Let the model fill in details. "a woman sitting on a bench, realistic, photograph" often works better than describing exactly what she's wearing and the exact type of bench.

The "Upscale First" Trick

Generate at your base resolution, then use img2img at 0.3-0.4 denoise with a hires fix. This adds detail without changing composition. Works much better than trying to generate at high res directly.