Stable Diffusion Prompt Engineering Tips

Stable Diffusion is an AI system that generates images from text descriptions, known as prompts. Crafting effective prompts is key to producing high-quality AI art with Stable Diffusion. This process of optimizing prompts to yield better results is called prompt engineering.

In this article, I will share my top prompt engineering tips for Stable Diffusion, as an AI art expert with years of hands-on experience. These techniques will help you create prompts that produce stunning, creative images tailored to your artistic vision.

Describe the Desired Image in Detail


The more detailed your prompt, the better results Stable Diffusion can generate. Specify elements like:

  • Subject matter
  • Number of subjects
  • Pose/framing
  • Facial expressions
  • Outfits/accessories
  • Scene setting
  • Lighting
  • Background
  • Foreground elements

For example:

A smiling young woman with long blonde hair braided over one shoulder. She is outdoors in a vibrant green meadow filled with yellow flowers, wearing a red gingham dress and holding a picnic basket. Soft sunset lighting warms the scene.

Use Brackets for Optional Elements


Wrap optional prompt elements in brackets [ ] so Stable Diffusion understands they can be omitted if needed. For example:

A [smiling] woman with [blonde] hair wearing a red dress [outdoors in a meadow].

Leverage Text Weights


Prefix keywords with a number and colon to indicate their relative importance. For example:

1.5: A beautiful woman with sparkling eyes, 0.5: smiling softly, wearing an elegant black evening gown. 

Higher weights tell Stable Diffusion to prioritize those elements.

Employ Negative Prompts


Add elements you want to avoid prefixed with - inside the prompt. For example:

A woman wearing a red dress outdoors in a meadow -ugly, -poorly drawn, -bad anatomy

This reduces unwanted outputs.

Check Prompt Length


Longer prompts provide more direction but are limited by Stable Diffusion systems. Check length limits before generating.

Test and Refine


Experiment with small variations between generations to refine prompts. Compare differences side-by-side.

Useful Websites for Prompt Engineering


With practice, you can master prompt engineering to create incredible AI art. Let me know if you have any other questions!