Tips for Writing Good Stable Diffusion Prompts

Working with AI image generators like Stable Diffusion can feel magical. You type in a text prompt, and moments later you have a unique, creative image generated just for you! However, crafting the perfect prompt is an art in itself. The words you choose can make the difference between generating a stunning masterpiece or a bizarre mashup.

After experimenting extensively with Stable Diffusion, I’ve learned some key tips for writing prompts that reliably produce high-quality images. In this guide, I’ll share everything I’ve learned to help you get the most out of this amazing technology.

Understand How Stable Diffusion Works

Before you start writing prompts, it helps to understand what’s going on behind the scenes. Stable Diffusion is trained on millions of image-text pairs to learn the relationships between words and visual concepts.

When you give it a new text prompt, Stable Diffusion refers back to all those images and looks for common patterns that match the words you used. The better your prompt, the more closely the output will resemble your intended idea.

Start with the Basics

When first getting started, don’t try to be overly complex with your prompts. Stable Diffusion works best when you break down your request into simple pieces:

  • Subject matter
  • Style/medium
  • Setting/context
  • Composition

For example:

An oil painting portrait of a girl with red hair wearing a blue dress standing in a poppy field 

As you get more comfortable with how Stable Diffusion interprets different words and phrases, you can start embellishing with more descriptive details. But start simple.

Use Specific, Unambiguous Language

Stable Diffusion can only generate what it has seen in its training data. Using specific words that have definite visual meanings will serve you better than vague, abstract language.

For example, a tall tower will produce better results than a very big building. And golden retriever puppy is better than just dog.

Provide Context

Giving Stable Diffusion some background on the subject or setting will lead to images that make more visual sense. If you simply request a girl sitting on a chair, you may get odd results with the chair floating in space. But add in context, and it will render a coherent scene:

A 9 year old girl with blonde hair sitting on a beanbag chair playing video games in her bedroom

Use Text Weighting

You can guide Stable Diffusion to prioritize certain words or phrases by adding a decimal value in brackets at the end of the relevant text. For example:

An oil painting of a red rose [1.2] on a windowsill [0.8] with sunlight streaming in [0.5]

Higher weights on red rose will make that more prominent in the final image.

Leverage Styles & Artists

You can mimic different art styles by name, like impressionist landscape or cubist portrait. For extra control, also include a specific artist:

A Claude Monet style landscape painting of a boat on a lake at sunset

This produces images reminiscent of Monet’s dreamy, pastoral scenes.

Use Negative Prompts

Negative prompts let you specify things you don’t want to see in the image. This is useful for excluding common elements that Stable Diffusion likes to generate.

For example:

A still life painting of fruit in a bowl, (no people), (no utensils), highly detailed

Experiment Extensively

Don’t be afraid to try unusual word combinations or niche concepts. Part of the fun with Stable Diffusion is discovering random visual mashups you’d never think to create on your own!

And expect to go through lots of trial and error tweaking prompts before you get output you love. Small wording changes can make a dramatic difference.

Useful Resources:

With practice, patience, and persistence, you can master the art of prompt engineering. By following these tips, you’ll be ready to create dazzling AI-generated art with Stable Diffusion. Just remember to have fun experimenting along the way!

Level 3 Header

Some text here.

Level 4 Header

More text here.