A good Stable Diffusion prompt should start with a clear and brief statement that tells the model exactly what you want it to generate. You need to clearly define the problem you want Stable Diffusion to solve.
Some key elements to include in a good prompt:
- Topic/theme – Specify the overall topic, theme or genre, e.g. “portrait painting”, “cyberpunk cityscape”
- Subject – Define the main subject of focus, e.g. “a girl”, “a robot”
- Style/medium – Mention a particular artistic style or medium, e.g. “impressionist oil painting”, “anime digital art”
- Setting/context – Set the context or environment for your subject, e.g. “a girl reading a book in a library”
- Emotion/mood – Convey a particular feeling or mood, e.g. “a sad clown”, “a hopeful astronaut”
- Composition – Describe the desired composition, e.g. “portrait orientation”, “looking down from above”
- Lighting – Specify lighting such as “soft lighting”, “rays of sunlight beaming through clouds”
Prompt Length
The maximum prompt length depends on the Stable Diffusion service used. The basic v1 model allows up to 75 tokens.
Tokens are not the same as words – the AI converts text into numeric token representations. Unknown words may be split into multiple sub-words.
In general, prompts should be as concise yet detailed as possible within the length limit. Adding too much detail can restrict creativity.
Prompt Engineering Techniques
Here are some key techniques to refine prompts:
Negative Prompts
Negative prompts exclude unwanted elements by prefixing words with a minus -
sign. For example, -ugly, -blurry, -bad anatomy
.
Bracketed Emphasis
Wrap words in brackets []
to increase their influence on the image. Using multiple brackets [[]]
emphasizes it further.
Parenthesized Conditions
Add secondary aspects in parentheses ()
. For example, (wearing a blue dress)
or ((showing her pearly white teeth))
.
Consistent Faces
Generating consistent human faces is challenging. Useful keywords include beautiful
, photorealistic
, intricately detailed features
.
Limiting Variation
Even generic words like “woman” and “dress” can limit variation significantly. Be very selective with keywords to allow more creativity.
Relevant Artists
Mentioning a relevant artist in prompts greatly influences the style, e.g. greg rutkowski
, alphonse mucha
.
Prompt History
The Prompt History option allows you to view and reuse old prompts. This is very useful for iterating on prompts.
Example Stable Diffusion Prompts
Here are some example prompts of increasing complexity:
A cute puppy
An oil painting of a girl in a blue dress reading a book in a library
A majestic white Bengal tiger walking through a lush green forest, digital art by Greg Rutkowski and Alphonse Mucha
A close-up portrait of an elderly woman with intricate details and texture in black and white photographic style, by Annie Leibovitz
Prompt Resources
Here are some useful resources for Stable Diffusion prompts:
- Lexica – Searchable repository of SD images and prompts
- Prompt Hero – Curated gallery of top SD prompts
- Stable Diffusion Subreddit – Tips and examples from the SD community
- Automatic1111 Webui – Popular SD web interface with prompts
The key is to experiment extensively with prompts to develop an intuition for Stable Diffusion’s response. With practice, you can learn to craft prompts that generate stunning AI art.