Stable Diffusion Prompt Guide

Crafting effective Stable Diffusion prompt can seem like a daunting task, this guide will show you techniques to create better AI images.

Illustration of an AI generating images from a Stable Diffusion Prompt
Published at

Crafting effective prompts for Stable Diffusion can seem like a daunting task, but with the right techniques, it's possible to achieve the results you desire. This guide breaks down the essentials of prompt crafting, enabling you to create with less effort and more creativity.

The Basics of Prompting:

Prompts in Stable Diffusion are ordered from most important to least important, from top to bottom, and from left to right. Concepts such as the subject, lighting, photography style, color scheme, and more play crucial roles in shaping your image. Style prompts, influenced by art styles, celebrities, and clothing types, allow for a broad range of creative expression.

Token Limits and Prompt Box:

Each prompt has a token limit indicating the maximum number of words it can process in chunks of 75 tokens. This mechanism is how the AI model breaks down and processes text. The prompt box is your canvas for describing, manipulating, and designing your image. It is recommended to keep prompts concise for easier adjustment.

Negative Prompts and Special Characters:

The negative prompt box lets you specify what you don't want in your image, such as undesirable elements or bad anatomy. Special characters like parentheses and square brackets can manipulate the weight or importance of words in your prompt. This allows for finer control over the generated image.

Prompt Weighting and Embeddings:

You can adjust the impact of certain words in your prompt using weighting, with the possibility to specify values for more precise control. Embeddings, though not editable in this version of Stable Diffusion, are used in conjunction with files to influence the strength of generated details.

Advanced Prompting Techniques:

Prompt editing allows for dynamic changes during image generation, using formats like "from-to-when" to specify transitions or removals of certain prompts. The use of backslashes can neutralize special characters, treating them as ordinary text. The "BREAK" keyword and horizontal lines introduce additional ways to influence prompt processing.

CFG Scale and Prompt Matrix:

The CFG scale determines how closely the generated image should adhere to your prompt, with a range usually between 5 and 12 for balanced results. The prompt matrix is a tool for analyzing the impact of individual prompts, helping you refine your creative direction.

Testing and Comparison:

Stable Diffusion supports testing multiple prompts simultaneously, either through direct input or from a file, enabling easy comparison of outcomes. The XYZ plot feature allows for further experimentation with variables like seed and CFG scale.

Prompting in Stable Diffusion is an art that combines creativity with technical understanding. By experimenting with the techniques outlined in this guide, you'll be able to fine-tune your prompts. This will help achieve more precise and compelling results in your AI-generated art.

Extra Resources:

Download the free stable diffusion prompt book crafted by OpenArt community here.

Checkout our guides on how to install stable diffusion on windows and how to train a diffusion model. These will help you get up and running, and understand the internals of how AI generates image.

You can also watch the video here to learn in more detail about good stable diffusion prompt practices:

Related Articles

Discover answers to the top 10 web scraping questions. From Python basics to using software and services related to data collection skills.

Angad LambaAngad Lamba
Published at

Learn how to train a diffusion model from scratch and find resources on diving deep into diffusion and AI image generation.

Prabhjot Singh LambaPrabhjot Singh Lamba
Published at