Stable Diffusion Prompt Design

Stable Diffusion is an AI image generation model that creates images from text prompts. Writing effective prompts is key to generating high-quality images that match your creative vision. Prompt engineering refers to the craft of designing prompts that clearly communicate what you want the AI to generate.

Mastering stable diffusion prompt design requires an understanding of the AI model, how to format prompts properly, and techniques for controlling the output. This article provides markdown-formatted guidance on prompt engineering best practices with examples.

Prompt Structure

A typical stable diffusion prompt has a basic structure:

"A [style] [subject] [modifiers]" 

For example:

"A oil painting of a tabby cat playing with yarn, by John Singer Sargent"

Let’s break this prompt down:

  • Style: oil painting
  • Subject: tabby cat playing with yarn
  • Modifiers: by John Singer Sargent

When designing prompts, clearly define the style, subject matter, and any descriptive details. Be as specific as possible.

Formatting Conventions

Use markdown formatting to improve prompt readability:

  • Separate clauses with commas (,)
  • Use capitalization and punctuation properly
  • Put modifiers like artist names in em dashes (—)

For example:

"An impressionist landscape painting of a lake at sunset—in the style of Claude Monet"

Key Prompt Engineering Techniques

Advertisement

Here are some key techniques for engineering effective stable diffusion prompts:

Specifying Details

Provide lots of descriptive details about what you want generated. For example:

"A candid photo of a baby sea otter floating in the ocean, wrapped up in kelp while sleeping, soft lighting"

Details like “wrapped up in kelp while sleeping” and “soft lighting” give the AI more to work with.

Using Reference Images

Show the AI examples of what you’re looking for by specifying a reference artist:

"A spacescape painting featuring an astronaut floating near a nebula, trending on ArtStation --by Greg Rutkowski--" 

Weight Control

Use multiple sets of em dashes around an artist name to strongly influence the style:

"An astronaut exploring a colorful alien planet, by --Moebius-- with intricate details"

Negative Prompts

Add negative prompts after the image description to exclude unwanted elements, formatted like:

(negative prompt)

For example:

"A still life painting of fruit in a bowl (blurry, bad anatomy, extra limbs)"

Advanced Prompt Design

Advertisement

As you gain more experience with stable diffusion, try these advanced techniques:

Prompt Chaining

Chain multiple styles together:

"A sci-fi digital painting of an astronaut on Mars --by Greg Rutkowski and Syd Mead--"

Nested Wrapping

Use nested em dashes to blend styles:

"An astronaut exploring a nebula --by (--Greg Rutkowski and --Syd Mead--)--"

The inner artist will have more influence.

Repeated Elements

Repeat elements to emphasize them, formatted like:

((element))

For example:

"A close-up portrait of a girl with freckles ((freckles)), soft lighting"

Conceptual Modifiers

Use conceptual elements to convey a feeling or theme:

"A psychedelic painting of a landscape with a mystical mood"

There are endless possibilities for stable diffusion prompt design. Start simple and then incorporate advanced techniques as you practice prompt engineering. Refer to the examples in this guide and continually refine your prompts to achieve better results.

Useful Stable Diffusion Prompt Websites

Advertisement

Here are some useful websites with stable diffusion prompts:

  • PromptHero – Search and share prompts
  • Lexica – Public gallery of AI-generated images
  • PromptMania – Prompt generator with categories
  • WhatPlugin – Prompt ideas for creative projects

Browse these galleries for inspiration and new prompt ideas. Pay attention to prompts that produce images you like. Analyze what makes them effective.

Over time, you will develop intuition for great prompt design. Mastering this art will allow you to generate stunning AI images that bring your creative visions to life!

Advertisement