To create good images with AI, you will need to understand how to properly craft your prompt. This means you must understand the following concepts:
The components of a positive prompt
The usage of negative prompts
Special operators and image generation steps
Your positive prompt should be a short and concise list of terms that describe the elements you want to see in your image. You should start with the following types of terms:
Prompt Component | Description | Example |
---|---|---|
Subject | what do you want to see in the image | an elf |
Paragraph | The artistic style of the image | photography, anime, painting |
Style modifier | Keyword that fine-tunes the style | hyper-realistic, abstract |
¶ Positive Prompt Examples
- a painting of an elf, realistic
- a realistic photo of an elf
- an abstract drawing of an elf
Prompt Component | Description | Example | Notes |
---|---|---|---|
Major Details | Keywords that must be included | Physical keywords, Setting keywords, Outfit keywords | |
Additional Details | Specific characteristics to fine-tune your image output | Sci-fi, dystopian | Can be mixed |
Lighting | The way you want light to factor into your image | Cinematic lighting, dark | Can be mixed |
Resolution | How sharp and detailed you want the image | Highly detailed, sharp focus, 4k, 8k, ultra quality | Only include one resolution-based modifier in your terms list |
Color | Describe the overall look of the image or colors you want to feature | Black and white, sepia, gold | Include no more than a couple of specified colors |
¶ Positive Prompt Examples
- a photo of an elf,sitting on the ground,forest background,realistic,detailed
- a photograph of an exhausted elf, siting in a dark forest,hyperrealistic,detailed
- an abstract forest background, an elf,gorgeous face,alluring features,ultradetailed,ultraquality
Because of the wide range of concepts associated with certain terms, you may see elements you don't want in your final image. Negative prompts can be helpful in clarifying what you don't want to see in your final image.
Elves are both creatures that exist in high-fantasy settings but also as part of Christmas mythology. The AI may therefore combine elements of both into your image. However, you can add Christmas
to the negative prompts to get a result like the following image
Positive
an elf, in a cottage
- Negative
Christmas
Keep the negative prompt list short.
Always start an image with no more than three negative prompts and only add to the list as needed.
Avoid conflicts between your positive and negative prompts.
Be as broad as possible with your negative prompts.
- Two or more keywords that produce image elements that contradict each other.
- Without proper weighting and balance the contradicting terms will distrort the image, and produce unwanted results.
- It is adviced, when creating a new prompt to take the time and add each keyword at a time to check for problem terms.
Positive
a woman wearing a green dressNegative:
green
Positive
A man wearing white socks, with big feet
Special syntax refer to certain structures and punctuation in your prompts that the AI interprets in a specific way. The most basic special operator is a comma ,
, telling the AI where one part of your prompt ends and the next part begins. However, there are a variety of other special operators you can use to add nuance to your prompts and return a better image.
Modifier | Effect |
---|---|
Parentheses () |
Surrounding a term in parentheses increases the weight of the term 10%, making it more prominent. |
Additional parentheses increase the weight further multiplicatively. | |
For example, ((term)) will increase the weight of the term by 21%, and (((term))) by 33%. |
|
Brackets [] |
Brackets decrease the weight of the term by 10%, making it less prominent. |
These also stack multiplicatively; [[term]] reduces weight by 19%, [[[term]]] by 27%. |
|
Backslash \ |
If you want to use any of the literal ()[] characters in the prompt, use the backslash to escape them: anime_\(character\) . |
Avoid using more than 3 layers of brackets or parentheses as this may create unexpected results. Additionally, weights may behave differently when used in negative prmopts compared to positive prompts. Test different weights to experiment with the result.
Lets start with the basic prompt,
a woman, garden background
Now let's tone down the weight of a woman.
[a woman], garden background
- Notice how the garden background is now more apparent in the image.
Now let's tone down the weight of
garden background
a woman, [garden background]
- Notice the woman being more in focus than the garden.
While the usage of parentheses and brackets is universal, some models support additional syntax. You can experiment with the following syntax:
(term:X.X)
, where X.X
is a decimal number: This multiplies the weight of your term
by the value of X.X
. A value less than one decreases the weight and a value greater than one increases the weight. It is recommended to keep X.X
between 0.5
and 1.5
Prompt blending takes two or more concepts and merges them together in the final image. For example, you could use prompt blending syntax with apple
and fire
to create an apple that appears to be on fire.
[term1:term2:X.X]
term1
and term2
with blending control via X.X
.X.X
ranges from 0.2 to 0.5, term2
is favored.term1
is favored.[keyword1:keyword2:0.3]
keyword2
more.[keyword1:keyword2:0.7]
keyword1
more.[term1|term2|term3]
{term1|term2|term3}
{term1:term2}
(credit Meaca_g)
To understand the technical application of the syntax above, it's important to understand the basics of how the image is generated. At its core, the Stable Diffusion engine works on a series of steps. After each step, the image becomes more refined with diminishing returns as the number of steps increases. Sexy.ai generates images with 20 steps, meaning that your image is generated after 20 iterations.
Practically speaking, the special syntax modifies how terms are applied during the step process.
[term]
will only be active for 0.9 of the frames, or 18 frames(term)
will be more active in all frames.(term)[term2]
will be averaged out.[term1|term2]
will alternate every other step.[term:term2:X.X]
will swap from term to term2 after the proportion given. For example, term1:term2:0.4
would swap from term1
to term2
after the 8th step (0.4 x 20 = 8)Multiple subjects can be created by the following keywords and prompt phrases
Prompt Component | Description |
---|---|
A man and a woman | Specify a man and a woman in the image. |
Two men/two women | Request two men or two women in the image. |
Various men/Various Women | Request various men or various women, allowing for diversity in characters. |
Non-Specific Wording | Non-specific wording that allows for multiple characters. Create independent traits like hair and clothing without specifying. |
Group of man\woman\etc |
Creates a random number of subjects in the image. |
extreme close shot
or close shot
and are not getting two subjects, consider pulling back and trying a more open shot, such as long shot
, wide shot
, or far shot
.two people/men/women etc
as the viewer and the subject and may keep a third person from being added.Simple
pov,[angle of view],view of [subject statement],[major/minor details], [setting],[lighting],[quality]
Advanced
[gender][camera distance]pov,[angle of view],view of [subject statement],[major/minor details], [setting],[lighting],[quality]
Prompt Component | Description | Example |
---|---|---|
angle of view | the angle of the camera in relation to the subject | from behind, from below, from above, from the side, from over head |
view of | keyword maker that indicates the following will be the main subject of the image | - |
subject statement | keyword statment that includes the number of subjects | view of a woman eating dinner |
gender | sex of the intended subject in the image | male pov ,female pov ,cat pov |
camara distance | the distance between the subject and the camera | Limited use and distance in POV. far pov ,mid pov |
pov,from overhead,view of a woman laying on a bed,hotel lobby background, soft light, soft shadows, ultraquality
Perspective Type | Description | Notes |
---|---|---|
First Person Perspective | Provides a view from the perspective of the viewer. | Shows more of the viewer's body. |
Second Person Perspective | May switch the perspective between subjects on some engine. | Can break the eye connection bias of the engine. |
Third Person Perspective | Creates a removed perspective from the original subjects. | Can be combines with different angle views. Breaks eye connection bias |
Voyeuristic Perspective | Creates a image similar to POV but with more distance control | Breaks the eye connection bias. Subjects act as if the camera isn't present. Enables creative effects and shots. |