Prompt weighting

Also known as: prompt term weighting

On this page 7

Prompt weighting is the technique of assigning numeric importance to individual words or phrases in a prompt so that a generative model pays more or less attention to them. It is used mainly with text-to-image diffusion models, where a syntax such as (red scarf:1.3) tells the interface to amplify the influence of that phrase on the image, while values below 1 weaken it.

Prompting for image models differs from prompting for language models because diffusion pipelines expose the text embeddings directly, which makes per-token scaling possible. Prompt weighting, also called prompt term weighting, is therefore a precise control in generative artificial intelligence that complements wording, word order and the negative prompt.

How prompt weighting changes the text embedding

Prompt weighting works by scaling the conditioning vectors that the text encoder produces for each token. In Stable Diffusion, a CLIP text encoder turns the prompt into a sequence of token embeddings, and the denoising network reads them through cross-attention at every sampling step. Multiplying the embeddings of a phrase by a factor such as 1.3 makes that phrase pull harder on the attention maps, so its visual features appear more strongly.

Implementations differ in an important detail. The widely used AUTOMATIC1111 web interface multiplies the weighted embeddings and then rescales the whole sequence to restore its original mean, which keeps overall image statistics stable. Other tools, including some ComfyUI nodes and the Compel library, scale or interpolate differently, so the same weight can produce different strength across interfaces. Weights are therefore relative settings, not universal units.

The table below shows how common weight values usually behave in Stable Diffusion style pipelines.

WeightTypical effectRisk
0.5 to 0.8Concept softened or partly presentMay disappear if the prompt is long
1.0Neutral default influenceNone
1.1 to 1.4Clear emphasis on the conceptMinor composition shifts
1.5 to 2.0Strong dominance of the conceptOversaturation, distortion, repeated objects
Above 2.0Rarely usefulNoise, broken anatomy, ignored remainder of prompt
Typical weight values and their effect

Weighting syntax across image generation tools

There is no single standard syntax for prompt weighting; each interface defines its own parser. Learning the conventions of the tool in use matters because a weighting expression that one interface understands may be treated as literal text by another, which silently changes the prompt.

The following table compares the most common notations.

Tool or libraryEmphasis syntaxDe-emphasis syntax
AUTOMATIC1111 and Forge(word:1.3) or ((word)) for 1.1 squared(word:0.7) or [word] for division by 1.1
ComfyUI(word:1.3), nested parentheses(word:0.7)
Compel libraryword++ with each plus adding about 10 percentword– with each minus reducing influence
Midjourney multi-promptsconcept::2 separated by double colonsconcept::-0.5 or the –no parameter
InvokeAIword+ or (phrase)1.3word- or (phrase)0.7
Prompt weighting notation by tool

Midjourney works differently from the embedding-scaling tools. Its multi-prompt weights split the prompt into separate concepts at the double colon and normalize the weights relative to each other, so hot::2 dog::1 behaves like a two-to-one balance. A negative weight subtracts a concept, and the total of all weights must remain positive.

Prompt weighting is one of several ways to control emphasis, and it is most effective when combined with the others. Its distinguishing property is that it is local and continuous: it adjusts one phrase by a measurable amount, whereas many alternatives act globally or only through wording.

This comparison shows where prompt weighting sits among neighboring controls.

TechniqueScopeWhat it controls
Prompt weightingOne word or phraseRelative strength of a concept
Negative promptWhole prompt, opposite directionConcepts the model should steer away from
Guidance scaleEntire promptHow closely the image follows the text overall
Word orderPosition in the token sequenceEarlier tokens tend to carry more weight
Prompt editing or schedulingSampling stepsWhich phrase applies at which stage of denoising
Prompt blendingTwo or more promptsInterpolation between whole conditioning vectors
Emphasis controls compared

Large language models offer no equivalent native syntax. Writing (important:1.5) in a chat prompt is read as ordinary text, and emphasis must come from instructions, delimiters, repetition or ordering. At the API level, a logit bias parameter can raise or lower the probability of specific output tokens, which resembles weighting but acts on generation rather than on the prompt.

Using prompt weighting effectively

Effective prompt weighting starts with a neutral prompt and a fixed seed. Keeping the seed, sampler, step count and guidance scale constant isolates the effect of each weight change, so the practitioner can see whether a value of 1.2 or 1.4 actually improves the image.

The decision table below lists common situations and suitable responses.

SituationRecommended actionReason
A requested detail is missingRaise its weight to 1.1 to 1.3Small increments rarely distort the image
One style dominates everythingLower that style to 0.7 to 0.9Restores balance without removing it
Two subjects merge into oneSeparate them with BREAK or regional promptingWeighting alone cannot fix concept bleeding
An unwanted element keeps appearingMove it to the negative promptNegative conditioning removes it more cleanly
Weights above 1.5 seem necessaryRewrite the prompt insteadExtreme values signal a wording problem
Choosing a weighting strategy

Weights also interact with the 75-token chunking of CLIP-based pipelines. Long prompts are split into chunks encoded separately, and a weighted phrase near a chunk boundary may behave unexpectedly. Keeping prompts concise and placing critical concepts early reduces the need for heavy weighting.

Limitations and common mistakes

Prompt weighting is a blunt instrument for semantic problems. It cannot teach a model a concept it has not learned, and it does not reliably bind attributes to the right object, so red hat and blue coat may still swap colors at any weight.

  • Stacking weights across many phrases cancels their effect, because emphasis is relative to the rest of the prompt.
  • Copying weights between models fails: SDXL, SD 1.5 and Flux-based pipelines react to the same value differently.
  • Portability problems arise when a prompt written for one interface is pasted into another with a different parser.
  • Newer text encoders such as T5 in some recent models respond less predictably to per-token scaling than CLIP.

Because results depend on the encoder, the interface and the model checkpoint, recorded weights should always be stored together with the full generation settings. Without that context, a weighted prompt cannot be reproduced reliably.

Stripped to the essentials

Prompt weighting is like a set of volume sliders for the words in an image request. Turning up the slider for “golden light” tells the model to make that feature stronger, while turning down “background crowd” makes it fade.

Small adjustments work best. Pushing a slider too far makes the picture strange or broken, and each image tool uses slightly different notation, so the same setting does not always mean the same thing.

Where it is applied

A product designer at a furniture company uses Stable Diffusion XL to explore concept images for a new armchair. The base prompt describes a walnut armchair in a bright Scandinavian living room, but the generated images keep showing the room more clearly than the chair, and the walnut grain looks pale.

With the seed fixed, the designer changes the prompt to (walnut armchair:1.3) and (living room:0.8), and adds (visible wood grain:1.2). Across a batch of eight images, the chair now fills the composition and the wood texture is distinct. An attempt at 1.8 produces warped legs, so the designer settles on the moderate values and saves the full settings with each approved image, allowing the team to regenerate consistent variations for a review meeting.