Chapter 10: Image Prompting for AI Art Models
This module explores techniques for crafting effective prompts for AI art generation models like DALL·E, Midjourney, and Stable Diffusion. Learn to create stunning visual outputs through strategic prompt engineering.

1. Style Modifiers
Style modifiers define the aesthetic of generated images by referencing artistic styles, mediums, or visual qualities.
Common Style Categories:
Art Movements
- Impressionism
- Surrealism
- Art Deco
Mediums
- Oil painting
- Watercolor
- Charcoal sketch
Visual Qualities
- Cyberpunk
- Minimalist
- Cinematic
Artists
- Van Gogh
- H.R. Giger
- Studio Ghibli
Basic Prompt:
With Style Modifiers:
Python Implementation (DALL·E API):
# Basic prompt
basic_response = openai.Image.create(
prompt="A city at night",
n=1,
size="1024x1024"
)
# Styled prompt
styled_response = openai.Image.create(
prompt=("A cyberpunk city at night, neon-lit with towering skyscrapers "
"and flying cars, in the style of Blade Runner 2049, digital art"),
n=1,
size="1024x1024"
)
# Display results (implementation depends on your environment)
print("Basic image URL:", basic_response['data'][0]['url'])
print("Styled image URL:", styled_response['data'][0]['url'])
2. Quality Boosters
Specific terms can enhance the technical quality and detail of generated images.
Example Progression:
Basic
Enhanced
Ultra Quality
Effective Quality Terms:
3. Weighted Terms
Emphasize important elements by assigning weights to different parts of your prompt.
Standard Prompt:
Equal emphasis on all elements
Weighted Prompt:
Mushrooms emphasized, cottage de-emphasized
Weighting Syntax Across Models:
Model | Syntax | Example |
---|---|---|
Stable Diffusion | (word:weight) | (mushrooms:1.5) |
Midjourney | ::weight | mushrooms::1.5 |
DALL·E | Natural language | "Focus on the mushrooms" |
4. Fixing Deformed Generations
AI art models often struggle with certain elements like hands, faces, and complex perspectives.
Common Issues and Fixes:
Problem: Distorted Hands
(Often generates extra fingers or unnatural poses)
Solution:
Problem: Asymmetrical Faces
(Eyes/nose/mouth may be misaligned)
Solution:
Troubleshooting Guide:
Problem Areas
- Hands and fingers
- Facial symmetry
- Text and signs
- Complex machinery
- Perspective in architecture
Fix Strategies
- Use negative prompts (--no [element])
- Specify "perfect", "symmetrical"
- Avoid close-ups of problematic areas
- Use simpler compositions
- Generate at higher resolutions
5. Negative Prompting
Explicitly exclude unwanted elements or qualities from your generated images.
Without Negative Prompt:
With Negative Prompt:
Common Negative Terms:
Python Implementation (Stable Diffusion):
import torch
# Load model
pipe = StableDiffusionPipeline.from_pretrained(
"CompVis/stable-diffusion-v1-4",
torch_dtype=torch.float16
).to("cuda")
# Generate with negative prompt
prompt = "A serene lakeside cabin at sunset"
negative_prompt = "people, animals, boats, blurry, low quality"
image = pipe(
prompt,
negative_prompt=negative_prompt,
height=512,
width=512
).images[0]
# Save or display image
image.save("lakeside_cabin.png")
6. Prompt Structure Best Practices
Effective image prompts follow a logical structure to communicate your vision clearly.
Optimal Prompt Structure:
- Main Subject: Clear description of primary focus
- Details: Specific attributes and features
- Composition: Framing, perspective, camera angle
- Style: Artistic medium, movement, or influence
- Quality: Technical specifications
- Lighting: Mood and illumination
- Color Palette: Dominant or accent colors
Example Breakdown:
with detailed fur, piercing blue eyes, and visible breath in the cold air (details),
low angle shot looking up, full body in frame (composition),
in the style of fantasy concept art, digital painting (style),
8K UHD, hyper-detailed, cinematic lighting (quality),
moonlight casting soft blue highlights (lighting),
cool tones with blue and silver accents (color palette)"
7. Iterative Prompt Refinement
Rarely does the first prompt produce perfect results. Iterative refinement is key.
Iteration 1
Too vague - needs more detail
Iteration 2
Add style and quality
Iteration 3
Final version