Stable Diffusion Prompt Guide
In this article, we will discuss something about how to write Stable Diffusion Prompts that can help you improve your AI image-generating results.
We will cover basic prompting techniques and some useful pro tips.
Basic Prompting
Prerequisite
You need to decide which model to use before getting started to create a prompt. There are tens of thousands of SD models (checkpoints, loras, and embeddings) available, each with its own styles and specialties. Some models excel at photorealism, while others specialize in domains like 3D renders, anime, portraits, etc. I list some excellent models that I often use for reference:
You can find more fantastic models on civitai.
Pattern
The most straightforward principle is to follow this pattern[Main Components] + [Extra Information]
Main Components
You can start with Four main components.
[quality], [element], [details], [style]
- quality: the magic words that will be important for the best output
masterpiece, best quality, highres
- element: the element essentially you want to see in the image.
- details: add some details to the subject.
can be anything like: clothes, hari, eyes, scene etc
- style: define the style of a certain artist that you want the image to have.
pixel art, anime, realistic, artbook, game cg
Prompt
masterpiece, 1girl, forest, suit, realistic highly detailed portrait
Extra Information
You can also add some more information to the prompt.
[pose or action], [setting/background], [lighting], [camera angle]
Prompt
masterpiece, 1girl, forest, suit, realistic highly detailed portrait, looking at viewer, sunshine, mysterious, soft lighting,sharp focus, depth of field
Pro Tips
Negative Prompts
Negative prompt is a specific type of prompt used to tell the AI image generator what you don't want to see in the generated image. It's an effective way to exclude certain elements or avoid some bad results.
Take a look at the examples below
quality: ugly, worst quality, bad proportions, blurry, bad proportions
element: text, signature, extra limbs, unclear eyes, many fingers, duplicate, watermark, morbid, missing arms, long neck,
style: nsfw, frame, any style you want to avoid you can use easyneagive, bad hand to make it simple and quick.
Text Weights
Text weight refers to a technique for emphasizing or de-emphasizing certain parts of your text prompt. This gives you more control over the resulting image and helps you guide the model towards your desired outcome.
You can define the weights by using brackets on SD Web UI:
- (word: 1.1): To increase the emphasis on the word by a factor of 1.1
- ((word)): To increase the emphasis on the word by a factor of 1.21 (1.1 x 1.1)
- (word: 0.5): To reduce the emphasis on the word by a factor of 2 (1 / 0.5)
- [word]: To reduce the emphasis on the word by a factor of 1.1
For example, let's try (wind:0.8) to (wind:1.5)
Prompt
Realistic, (greyscale, traditional media, sketch), portrait, 1girl, (wind:0.8)
Realistic, (greyscale, traditional media, sketch), portrait, 1girl, (wind:1.2)
Realistic, (greyscale, traditional media, sketch), portrait, 1girl, (wind:1.5)
Prompt Editing
Prompt editing allows you to dynamically change your text prompt during the process of image generation, leading to seamless transitions between two different styles. The base syntax for this is: [from:to:when]
. from
and to
are arbitrary texts and when is a number that defines how late in the sampling cycle should the switch be made.
- [to:when]: This syntax lets you add elements only after a specific number of generation steps. For example,
[to:10] a flock of birds flying overhead
will appear after 10 steps. - [from::when]: This removes elements at a specific step. For example
[from::15]a cloudy sky
Example:a [fantasy:cyberpunk:16] landscape
- At the start, the model will draw
a fantasy landscape
. - After step 16, it will switch to draw
a cyberpunk landscape
.
Example: fantasy landscape with a [mountain:lake:0.25] and [an oak:a christmas tree:0.75]
- at start,
fantasy landscape with a mountain and an oak in foreground shoddy
- after step 25,
fantasy landscape with a lake and an oak in foreground in background shoddy
- after step 75,
fantasy landscape with a lake and a christmas tree in background masterful
Let's try a more practical example: [Beach Waves:bob cut:0.8]
Prompt
Realistic, (traditional media), portrait, 1girl, [Beach Waves:bob cut:0.8]
Realistic, (traditional media), portrait, 1girl, [Beach Waves:bob cut:0.5]
Realistic, (traditional media), portrait, 1girl, [Beach Waves:bob cut:0.3]
Prompt generator
Do you feel that with so many styles, keywords, and techniques, it's really difficult to remember everything🥲? Don't worry, there are many tools available that can help you simplify this process.
- online stable diffusion prompt generator tool
A free SD prompt online generator that collects more than 800 commonly used prompts and tags.
a.tools - stable diffusion prompts generator
- generate stable diffusion prompt by chatgpt
Chatgpt can provide you with bunches of good prompt examples. If you don't have an OPENAI account, you can take a look at chat-gpt.ing, a free online GPT service that does not require login.
- easydiffuion online sd prompt generator
easydiffuion.online is a very convenient solution that can generate accurate and effective SD prompts directly and also provides free online image generation services.
That's all for today😃.