Prompt Engineering

Prompt Engineering for Image Generation

Write better prompts for Midjourney, DALL-E, and Stable Diffusion. Learn the anatomy of a visual prompt: subject, style, lighting, composition, and negative prompts.

Prompt Engineering for Image Generation

Image generation models respond to a fundamentally different prompt structure than text models. Where text models benefit from explicit reasoning instructions, image models require a visual vocabulary: subject, medium, style, lighting, composition, and quality modifiers all contribute to the final output. Getting these elements right is the difference between a generic AI image and a precisely rendered visual that matches your intent.

This guide covers universal principles that apply across tools like Midjourney, DALL-E 3, and Stable Diffusion, plus tool-specific syntax where it matters.

The Anatomy of a Visual Prompt

Effective image prompts are built from distinct descriptive layers. Think of each layer as a lens that narrows the visual space from millions of possibilities to the image you actually want.

1. Subject

What is the primary focus of the image? Be specific about:

  • Who/what — "a middle-aged woman" not "a person"
  • Action — "reading a book by candlelight" not "relaxing"
  • Key attributes — age, expression, distinctive features
# Weak subject
a robot

# Strong subject
a weathered chrome humanoid robot with visible joint mechanisms and a cracked
visor, sitting alone on a park bench

2. Medium and Style

What does this image look like as an artifact? This is one of the highest-impact elements:

  • Medium — oil painting, watercolor, digital illustration, photograph, pencil sketch
  • Artist reference — in the style of Monet, Greg Rutkowski, Alphonse Mucha
  • Era/movement — Art Nouveau, 1980s sci-fi illustration, Bauhaus, cyberpunk
  • Rendering style — photorealistic, cel-shaded, painterly, architectural visualization
photorealistic DSLR photograph | concept art | Studio Ghibli animation style |
inkwash illustration | 35mm film photography with grain

3. Lighting

Lighting dramatically changes mood and quality. Name it explicitly:

  • Golden hour — warm, directional, long shadows
  • Blue hour / twilight — cool, diffused, atmospheric
  • Dramatic side lighting / Rembrandt lighting — high contrast, strong shadows
  • Soft studio lighting — even, flattering, commercial
  • Bioluminescent / neon — colored practical lights for sci-fi aesthetics
  • Volumetric lighting / god rays — beams of light through atmosphere

4. Composition and Camera

For photographic or cinematic prompts:

  • Shot type — close-up portrait, full body, aerial view, wide establishing shot
  • Camera angle — low angle, bird's eye, Dutch angle, eye level
  • Lens — 85mm portrait lens, wide angle 24mm, macro
  • Depth of field — shallow DOF (bokeh background), deep focus
wide shot | extreme close-up | isometric view | first-person perspective |
cowboy shot | overhead flat lay

5. Environment and Setting

# Weak
outdoors

# Strong
overgrown cyberpunk alley at night, neon reflections on wet cobblestones,
distant rain-blurred city skyline

6. Quality and Rendering Modifiers

These terms reliably improve output quality:

highly detailed | intricate | 8k resolution | masterpiece | award-winning |
photorealistic | ray-traced | subsurface scattering | sharp focus |
professional photography | trending on ArtStation

Putting It Together

Here's a complete prompt built layer by layer:

[Subject] A lone astronaut in a worn NASA suit, helmet cracked, standing still
[Environment] on the surface of a red desert planet, ancient alien ruins in the
middle distance
[Lighting] dramatic sunset backlighting with rim light, dust particles in the air
[Style] photorealistic, cinematic, in the style of Ridley Scott sci-fi
[Camera] wide establishing shot, 35mm anamorphic lens
[Quality] highly detailed, 8k, masterpiece, trending on ArtStation

Output: a cinematic, emotionally resonant sci-fi image rather than a generic "astronaut on mars."

Negative Prompts

Negative prompts tell the model what to exclude. They are especially powerful in Stable Diffusion and Midjourney.

Common Negative Prompt Staples

blurry, low quality, watermark, signature, text, extra limbs, deformed hands,
low resolution, jpeg artifacts, oversaturated, flat lighting, bad anatomy,
clone stamp artifacts

Strategic Negative Prompts

Use negatives to push away from defaults you don't want:

# If the model keeps generating happy/cheerful outputs
negative: smiling, cheerful, bright, colorful

# If you want realism but keep getting painterly results
negative: painting, illustration, digital art, concept art

# If anatomy keeps distorting
negative: extra fingers, fused fingers, bad hands, deformed, mutated

Tool-Specific Syntax

Midjourney

  • Aspect ratio: --ar 16:9 or --ar 3:4
  • Style version: --v 6 (latest), --niji 6 (anime)
  • Stylization: --s 0 (literal) to --s 1000 (highly stylized)
  • Quality: --q 2 for higher quality renders
  • Negative: --no [terms]
  • Chaos: --chaos 0-100 for variation
  • Seed: --seed 12345 for reproducibility
photorealistic portrait of a silver fox in a tailored suit, moody bar lighting,
shallow depth of field, 85mm lens --ar 4:5 --v 6 --s 200 --no cartoon illustration

DALL-E 3

DALL-E 3 understands natural language descriptions extremely well. You can write more conversationally:

A cozy home library at night. Warm lamplight illuminates floor-to-ceiling bookshelves
filled with leather-bound books. A tabby cat is asleep on an overstuffed armchair.
Raindrops are visible on the window. Photorealistic, warm tones, cinematic quality.

DALL-E 3 does not support negative prompts natively — instead, describe what you do want and it generally avoids the rest.

Stable Diffusion

SD supports the most granular control:

  • Attention weighting: (term:1.5) increases weight, [term:0.5] decreases
  • Prompt blending: [term1:term2:0.3] blends concepts
  • LoRA injection: <lora:filename:0.8> for custom model weights
(masterpiece:1.3), (photorealistic:1.2), portrait of a female warrior,
battle-worn armor, (intricate details:1.4), dramatic lighting, [watercolor:0.2]
Negative: (low quality:1.4), blurry, deformed, ugly, extra limbs

Common Mistakes

  • Too abstract — "futuristic and beautiful" gives the model too much freedom. Specify concretely.
  • Conflicting styles — "watercolor photorealistic" is contradictory; pick a dominant style.
  • No lighting — unlighted prompts default to flat, uninspiring lighting.
  • Generic quality terms without specifics — "high quality" alone does less than "8k, ray-traced, sharp focus."
  • Ignoring composition — most beginners forget to specify shot type and end up with awkward crops.

Key Takeaways

  • Build prompts in layers: subject, style, lighting, composition, environment, quality
  • Negative prompts are essential for avoiding consistent failure modes
  • Artist and medium references are among the highest-impact elements
  • Learn the parameter syntax for your specific tool — --ar, --v, attention weights
  • Save prompts that work: great image prompts are reusable assets