How to Write Stable Diffusion Prompts: A Step-by-Step Guide

Struggling with vague, messy Stable Diffusion prompts that yield poor results?

Transform those prompts with simple techniques to make your AI art shine.

How to Write Stable Diffusion Prompts
How to Write Stable Diffusion Prompts

This guide reveals the anatomy, best practices, and advanced tactics for crafting clear, detailed Stable Diffusion prompts that generate stunning creations.

What Is Stable Diffusion?

Stable Diffusion is an AI image generation model created by researchers at Stability AI.

Using deep learning and natural language processing, Stable Diffusion can generate highly detailed images and art from text descriptions.

Unlike previous image generation models, Stable Diffusion produces clearer, more coherent results. However, to get the best images, you need to provide strong text prompts.

Understanding Stable Diffusion Prompts

Stable Diffusion prompts are simply text descriptions that guide the AI in generating images.

When writing a prompt, you need to describe the key elements of the image you want to create.

Some elements to specify include:

  • Subject matter: The main focus of the image – a person, animal, object, etc.
  • Composition: How elements are arranged spatially – centered, offset, close up, etc.
  • Style: The artistic style – photorealistic, impressionist, anime, etc.
  • Colors: Dominant colors or palettes.
  • Lighting: Time of day, shadows, light sources, etc.
  • Background: Contextual setting or scenery around the subject.
  • Medium: Drawing, painting, 3D, etc.
  • Details: Any small distinctive features to include.

The more descriptive the prompt, the better results you’ll achieve.

How to Write Stable Diffusion Prompts?

Here are some key tips for writing effective Stable Diffusion prompts:

  1. Identify the subject matter as the first part of your prompt. For example, “A portrait of a girl…” This gives the AI focus.
  2. Use descriptive adjectives and details. “A close-up portrait of a beautiful girl with long blonde hair…” This adds specificity.
  3. Set the tone and style. “…in an impressionist oil painting style.” This defines the artistic direction.
  4. Add context. “…sitting in a sunny meadow with flowers.” This gives the AI more to work with.
  5. Use comparisons when possible. “A portrait of a girl who looks like a Disney princess.” This refers to familiar archetypes.
  6. Give color direction. “…with a color palette of pink, peach, and blue.” This suggests hues.
  7. Direct the composition. “…cropped at the waist up with the face offset to the right.” This arranges elements.
  8. List out the medium, technique, or tools used. “…digitally painted using painterly brush strokes in Photoshop.” Denotes creation process.
  9. Suggest lighting and other effects. “…with soft lighting coming from the left and lens flare effects.” Sets lighting style.
  10. Eliminate ambiguity with details. “A close-up portrait of a beautiful girl with long blonde hair in a braided updo hairstyle wearing a pink floral sundress sitting in a sunny meadow filled with yellow and white daisies in an impressionist oil painting style with a color palette of pink, peach, and blue cropped at the waist up with the face offset to the right with soft lighting coming from the left and lens flare effects added in post-processing digitally painted using painterly brush strokes in Photoshop.” This detailed prompt removes the guesswork for the AI.

Anatomy of a Good Stable Diffusion Prompt

ConceptThe main topic or idea you want the AI to generateportrait of an astronaut riding a horse
StyleThe artistic style you want to mimicoil painting by Van Gogh
DetailsExtra descriptive details to narrow the focusdetailed background of stars and planets
Negative PromptsWords or phrases to exclude from the imagelow quality, blurry

The best Stable Diffusion prompts follow a general anatomy:

Subject: Identify subject matter – girl, cat, car, etc.

Style: Define artistic style – photorealistic, cartoon, geometric, etc.

Composition: Describe composition-centered, rule of thirds, close-up, etc.

Context: Establish context – location, period, environment, etc.

Color: Provide color direction – green background, sepia tone, etc.

Lighting: Set lighting – side lighting, high-key, chiaroscuro, etc.

Medium: Specify medium – oil painting, vector image, 3D, etc.

Details: Include distinct details – red shirt, glasses, flowers in hair, etc.

Process: List tools and techniques – rendered in Blender, glitch art effects, etc.

Good Stable Diffusion Prompts List

Here are some examples of good Stable Diffusion prompts:

  • A photorealistic portrait of a beautiful red-haired woman wearing a dark green velvet gown set against a blurred forest backdrop.
  • An astronaut floating in space with soft nebula clouds behind him, digital art.
  • A small fairy with butterfly wings resting on a sunflower rendered in Unreal Engine with motion blur.
  • A ray-traced 3D RGB color wheel spinning clockwise with a black background.
  • A glamour shot of a female vampire with smoky eyeshadow and blood-red lips digitally painted using a classical chiaroscuro style.
  • A fantasy landscape of a medieval castle on the edge of a sheer cliffside rendered in photorealistic 4k resolution.
  • A centered anime character with purple hair wearing steampunk goggles in an action pose digitally drawn in Clip Studio Paint.
  • A high-contrast Pulp Noir movie poster of a detective looking through Venetian blinds with only his silhouetted eyes visible.
  • A macro photograph of a dewdrop on a vibrant purple orchid petal with a blurred green background.
Astronaut riding a horseoil painting by Van Gogh of an astronaut riding a horse through a starry landscape, detailed background, high-quality
Futuristic cityA futuristic neon cityscape with flying cars, by Beeple, 8k high detail
Cute puppyA candid photograph of a cute golden retriever puppy playing in the grass, shallow depth of field
AI Image/Art generated by Stable Diffusion for the following prompt: "oil painting by Van Gogh of an astronaut riding a horse through a starry landscape, detailed background, high-quality".
Prompt: oil painting by Van Gogh of an astronaut riding a horse through a starry landscape, detailed background, high-quality

These prompts establish subject, style, composition, context, color, lighting, medium, details, and process – the hallmarks of a quality Stable Diffusion prompt.

Stable Diffusion Prompt Engineering Techniques

Some advanced techniques can help refine and improve your Stable Diffusion prompts:

Weighting: Use parentheses to weight and emphasize parts of a prompt. For example, (A beautiful portrait of a woman) with (green eyes) and (long flowing red hair).

Blending: Combine styles in a single prompt for unique results. For example, an astronaut is rendered in anime style.

Directing: Use terminology to direct the AI’s output. A neutral face, centered composition, high resolution, front angle view, etc.

Comparing: Refer to familiar archetypes or art styles the AI knows. A portrait in the style of a Renaissance oil painting, diagramed like a Leonardo da Vinci drawing, etc.

Adding: Use separate prompts for variations. Add wings, add a crown, add glasses, etc.

Subtracting: Generate a base image, then run a prompt removing elements. Remove background, remove people, remove text, etc.

These techniques allow fine-tuning of prompts for sharper results.

Stable Diffusion Prompt Best Practices

Follow these best practices when crafting Stable Diffusion prompts:

  • Be as detailed and specific as possible – don’t leave room for interpretation.
  • Structure prompts clearly from subject to process. Follow the standard anatomy.
  • Use proper grammar and punctuation for coherence.
  • Limit prompts to key details only for best results.
  • Avoid subjective evaluations like “beautiful” and “ugly” – describe features instead.
  • Use technical and professional vocabulary suited to the subject.
  • Run similar prompts multiple times to compare outputs.
  • Try different wordings and syntax to optimize prompts.
  • Reference other artworks or cultures to provide familiar concepts.

Adhering to these practices will improve prompt crafting. Be descriptive, objective, and experiment liberally.

Stable Diffusion Prompt Ideation and Inspiration

To generate ideas for effective prompts:

  • Browse genres and artists you want to emulate on art sites like DeviantArt to define styles.
  • Collect color palettes from sites like Adobe Color to inform color descriptions.
  • Look at photography for inspiration on lighting, composition, and context.
  • Use concept art from films, games, and entertainment for imaginative starting points.
  • Search “best AI prompts” lists online and dissect why they work.
  • Analyze real art pieces for subjects, styles, and techniques to describe.
  • Combine ideas from different artistic domains – fantasy portrait in art deco style, astronaut in neon retro landscape, etc.
  • Build an inspiration library of images, palettes, textures, and reference material.

Advanced Prompt Techniques For Stable Diffusion

More complex prompts can produce more impressive results. Some advanced techniques include:

  • Multi-step generation: Start with a base prompt, generate an image, and then refine with variations.
  • Masking: Use masks to protect parts of an image while generating new elements.
  • Inpainting: Remove and then recreate masked parts of an image via prompts.
  • Textual inversion: Insert text into an existing image, then regenerate it.
  • Interpolation: Blend two different generated images into one composite image.
  • Collaging: Combine elements from different outputs into a cohesive whole.
  • Upscaling: Increase the resolution of low-res outputs with gans or other AI models.
  • Post-processing: Use Photoshop, GIMP, etc. to touch up final images.

Final Thoughts

Crafting effective Stable Diffusion prompts is part art, part science. Use these guidelines to structure detailed, descriptive prompts consistently.

Experiment with advanced techniques to further refine your results.

With practice, you’ll be able to consistently generate stunning AI art.

Leave a Comment