Stable Diffusion Prompt Helper

Stable Diffusion is a powerful AI system for generating images from text prompts. As with any advanced technology, learning how to properly use Stable Diffusion takes time and practice. This guide aims to help users, especially beginners, in crafting better prompts to create higher quality images with Stable Diffusion.

Anatomy of a Good Prompt

A good Stable Diffusion prompt consists of several key components:

Subject and Style

Clearly state the main subject matter you want generated, along with the desired style. For example:

A majestic oil painting of a red fox in a mystical forest

Details

Add descriptive details about the subject, scene, lighting, angle/perspective, etc. The more details the better. For example:

A majestic oil painting of a red fox with sharp green eyes and a bushy tail, sitting in a dense mystical forest filled with tall trees and magical glowing mushrooms, dramatic side lighting creating strong shadows and rays of light piercing through the canopy

Undesired Elements

Specify what you do NOT want to avoid unwanted outputs. For example:

A majestic oil painting of a red fox with sharp green eyes and a bushy tail, sitting in a dense mystical forest filled with tall trees and magical glowing mushrooms, dramatic side lighting creating strong shadows and rays of light piercing through the canopy; no other animals, no buildings, no people

Negative Prompts

Negative prompts are a powerful way to restrict unwanted elements. Use them to:

  • Eliminate flaws like poor anatomy or distortions
  • Avoid inappropriate/NSFW content
  • Prevent watermarks and signatures

For example:

no errors, perfect anatomy, safe for work, ((watermark)), ((logo)), signature

Process for Building Good Prompts

  1. Start broad – Briefly describe the main subject matter
  2. Add details – Expand on the description adding relevant details
  3. Remove undesired elements – Add negative prompts to restrict unwanted outputs
  4. Review and refine – Check results and tweak prompts to better match your vision

This iterative process takes some trial and error, but leads to better prompts over time.

Useful Prompting Techniques

Here are some additional tips and techniques for getting better results:

Consistent Faces

  • Specify details like age, ethnicity, hair color, makeup
  • Use the same prompt to generate multiple images of the same person

Check Keywords

  • Review prompts for spelling, consistency, clarity
  • Check if keywords used match dataset domain

Limit Variation

  • Repeat key prompt terms at the beginning and end
  • Use exact matches like “”quotes”” around words

Association Effect

  • Associate elements that belong together like “a photo of a bride in a wedding dress”

Prompt Length

Stable Diffusion prompts can be quite long, with no strict limits. However, the AI typically only considers the first ~75-100 tokens. Anything beyond that likely has diminishing returns.

Aim to be as concise as possible while still including key details. Err on the side of keeping prompts shorter rather than excessively long.

Conclusion

Crafting effective Stable Diffusion prompts is a learnable skill. Start broad, add descriptive details, eliminate undesired elements, and refine over multiple iterations. Apply prompting techniques like consistent faces, checking keywords, limiting variation, and using associative relationships. Keep prompts as concise as possible. With practice, you’ll be able to create amazing AI-generated images.

Useful Resources