Prompting 101

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

Components of a Positive Prompt

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 ComponentDescriptionExample
Subjectwhat do you want to see in the imagean elf
ParagraphThe artistic style of the imagephotography, anime, painting
Style modifierKeyword that fine-tunes the stylehyper-realistic, abstract

Positive Prompt Examples

  • a painting of an elf, realistic
  • a realistic photo of an elf
  • an abstract drawing of an elf
Prompt ComponentDescriptionExampleNotes
Major DetailsKeywords that must be includedPhysical keywords, Setting keywords, Outfit keywords‚Äč
Additional DetailsSpecific characteristics to fine-tune your image outputSci-fi, dystopianCan be mixed
LightingThe way you want light to factor into your imageCinematic lighting, darkCan be mixed
ResolutionHow sharp and detailed you want the imageHighly detailed, sharp focus, 4k, 8k, ultra qualityOnly include one resolution-based modifier in your terms list
ColorDescribe the overall look of the image or colors you want to featureBlack and white, sepia, goldInclude 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

Components of a Negative Prompt

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.

Negative Prompt Example

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 elfchristmas.webp

Negative Christmas cottageelf.webp

When it comes to using negative prompts, you should keep a few things in mind

  1. Keep the negative prompt list short.
  2. Always start an image with no more than three negative prompts and only add to the list as needed.
  3. Avoid conflicts between your positive and negative prompts.
  4. Be as broad as possible with your negative prompts.

Keyword Conflict

  1. Two or more keywords that produce image elements that contradict each other.
  2. Without proper weighting and balance the contradicting terms will distrort the image, and produce unwanted results.
  3. It is adviced, when creating a new prompt to take the time and add each keyword at a time to check for problem terms.

Keyword conflict example

Positive a woman wearing a green dress

Negative: green

Positive A man wearing white socks, with big feet

Special Syntax

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.

ModifierEffect
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.

Keyword Weight Prompt Examples

Lets start with the basic prompt,

a woman, garden background 2if9n7y568eok5.webp

Now let's tone down the weight of a woman.

[a woman], garden background

  • Notice how the garden background is now more apperent in the image.* ayodq7wmo91q3d.webp

Now let's tone down the weight of garden background

a woman, [garden background]

Notice the woman being more in focus than the garden. 97u7i14c5xwfd0.webp

Additional Syntax

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

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]

  • Combines term1 and term2 with blending control via X.X.
  • When X.X ranges from 0.2 to 0.5, term2 is favored.
  • For values between 0.5 and 0.9, term1 is favored.

[keyword1:keyword2:0.3]

  • Emphasizes keyword2 more.

[keyword1:keyword2:0.7]

  • Emphasizes keyword1 more.

[term1|term2|term3]

  • Blends three terms equally.

{term1|term2|term3}

  • Requires the terms to appear/happen together.

{term1:term2}

  • Blends the terms with equal weight.

(credit Meaca_g)

Steps and Weights

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.

197556926-49ceb72b-daf3-4208-86f3-c2e7e9cd775a.gif Practically speaking, the special syntax modifies how terms are applied during the step process.

  • A [term] will only be active for 0.9 of the frames, or 18 frames
  • A (term) will be more active in all frames.
  • A (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 Subject

Multiple subjects can be created by the following keywords and prompt phrases

Subject Combinations

Prompt ComponentDescription
A man and a womanSpecify a man and a woman in the image.
Two men/two womenRequest two men or two women in the image.
Various men/Various WomenRequest various men or various women, allowing for diversity in characters.
Non-Specific WordingNon-specific wording that allows for multiple characters. Create independent traits like hair and clothing without specifying.
Group of man\woman\etcCreates a random number of subjects in the image.

Image Composition Tips

  • The success of the image will depend on the type of shot, the engine, and ultimately the term usage.
  • If you have an 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.
  • Try not to be overly specific when requesting two people or more. More people means more pixel division.

Point of View/Perspective Shot

  • POV/Perspective shots use a fisheye style lense to create a realistic voyueristic effect.
  • POV shots will take the term two people/men/women etc as the viewer and the subject and may keep a third person from being added.

POV Basic Prompt Structure

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 ComponentDescriptionExample
angle of viewthe angle of the camera in relation to the subjectfrom behind, from below, from above, from the side, from over head
view ofkeyword maker that indicates the following will be the main subject of the image-
subject statementkeyword statment that includes the number of subjectsview of a woman eating dinner
gendersex of the intended subject in the imagemale pov,female pov,cat pov
camara distancethe distance between the subject and the cameraLimited use and distance in POV. far pov,mid pov

Prompt Example

pov,from overhead,view of a woman laying on a bed,hotel lobby background, soft light, soft shadows, ultraquality >overheadpov.webp

Perspective Shots

Perspective TypeDescriptionNotes
First Person PerspectiveProvides a view from the perspective of the viewer.Shows more of the viewer's body.
Second Person PerspectiveMay switch the perspective between subjects on some engine.Can break the eye connection bias of the engine.
Third Person PerspectiveCreates a removed perspective from the original subjects.Can be combines with different angle views. Breaks eye connection bias
Voyeuristic PerspectiveCreates a image similar to POV but with more distance controlBreaks the eye connection bias. Subjects act as if the camera isn't present. Enables creative effects and shots.