Guide to Stable Diffusion Prompt Weights
Refine your Stable Diffusion results with prompt weighting. Discover how to adjust the importance of parts of your prompt for more accurate image creation.
What does prompt weighting mean?
Prompt weighting allows you to emphasize or de-emphasize certain parts of a prompt, giving you more control over the generated image. This guide will show you how to weigh your prompts.
Prompt weighting basics
In order to increase emphasis on a word or phrase, add a
+
or number between1.1
and2
at the end.In order to reduce emphasis on a word or phrase, add a
-
or number between0
and0.9
at the end.The default weight
= 1
The more weight you add, the greater the risk of lower quality there is.
The following syntax is recognized:
single words without parentheses:
penguin holding a beer+
single or multiple words with parentheses:
penguin holding a (beer)+
penguin holding a (beer)-
penguin (holding a beer)+
penguin (holding a beer)-
more symbols result in more effect:
penguin (holding a beer)+++
penguin (holding a beer)+++
nesting:
penguin (holding a beer+)++
--> beer effectively gets +++
all of the above with numbers:
penguin holding (a beer)1.1
penguin (holding (a beer)1.3)1.1
weighting with numbers:
+
is equivalent to1.1
;++
is equivalent to1.1^2
;+++
is equivalent to1.1^3
etc.-
is equivalent to0.9
;--
is equivalent to0.9^2
;---
is equivalent to0.9^3
etc.
Prompt weighting also works with negative prompts! If you don't want something in your image and want to make sure it won't appear, just add more weight to the negative prompt.
Unsupported prompt weighting syntax
Some open-source Stable Diffusion interfaces use a different prompt weighting syntax that doesn’t work with our tools. For example, it could be a syntax that uses () to increase and [] to decrease the weight of a specific part of the prompt, with optional numerical weights.
getimg.ai’s tools don’t support any alternate syntaxes, and attempting to use them may produce unintended results. For example, prompts containing too many parentheses can slow down weight processing.
We recommend sticking to the +/- and numerical weighting syntax covered earlier, with parentheses serving only as a way to apply weight to multi-word phrases. A validator will check for excessive parentheses and notify you of potential issues.
If you find a prompt that you want to test with our tools, but it uses a different prompt weighting syntax, remember to convert it according to our guidelines.
Prompt weighting examples
Let's look at two practical examples showing how prompt weighting works and how to use it.
Example 1
You can use prompt weighting to increase or decrease the amount of something. We will use the prompt "penguin holding a beer" as an example and see what happens if we increase or decrease the amount of attention we want Stable Diffusion to pay to the word "beer".
Using -
to reduce beer-ness:
Using +
to increase beer-ness:
Example 2
You can also change the balance between different parts of a prompt. Let's take a look at an example of an apple pie below.
Apple pie with more apple:
Alternatively, apple pie with more pie:
Prompt weighting is available in all the getimg.ai tools. This means you can test your new knowledge with the AI Generator, Image Editor, AI Canvas, and DreamBooth.
Frequently Asked Questions
Should the symbols +- follow the phrase directly or after a space?
The symbols +- should follow the word or phrase directly. There shouldn’t be a space between these two. e.g. a horse++
To what extent does a symbol change the weight?
+
is equivalent to1.1
,++
to1.1^2
,+++
to1.1^3
, etc.-
is equivalent to0.9
,--
to0.9^2
,---
to0.9^3
, etc.
How do I weigh multi-word phrases?
If you want to weigh the phrase "in the style of Tamara Łempicka", you should put the phrase in brackets. e.g. (in the style of Tamara Łempicka)++
What about complex phrases: "in the style of Tamara Łempicka and expressionism"? How can I have more expressionism and less Tamara Łempicka?
If you want to have more "expressionism" and less "Tamara Łempicka", you should do the following:
in the style of (Tamara Łempicka)- and (expressionism)+
or
(in the style of Tamara Łempicka)-, (in the style of expressionism)+