search

Found

info Overview

Reads (word:1.2), ((word)) and [word] in AUTOMATIC1111 WebUI prompts, nested ones too, and lists each word's weight, its change from 1.0 and a bar.

📘 How to Use

  1. Enter a prompt with emphasis syntax (e.g., `(word:1.2)`, `[word]`) into the Prompt Input field.
  2. Read each word's Weight and Change from the baseline of 1.0.
  3. Use the Relative bar to compare the importance of different tokens.
  4. Refine your prompt based on the values, or press Clear to start over.

AI Prompt Weight Visualizer

Token
Weight
Change
Relative
Positive
Negative

Enter a prompt above to start analysis

Article

AI Prompt Weight Simulator | Visualize & Master Emphasis Syntax for Stable Diffusion

This tool analyzes prompt weighting syntax, commonly used in AI image generation models like Stable Diffusion. See how syntax like (word:1.2) and [word] impacts the attention value of each token, helping you craft more precise and effective prompts.

💡 Tool Overview

  • Updates as You Type: The results change as you edit your prompt, showing how the emphasis of each word is interpreted.
  • Supports Common Syntaxes: Accurately calculates weights for the most widely used formats: explicit weighting (word:1.5), parenthesis emphasis (word), and bracket de-emphasis [word].
  • Handles Nested Brackets: Correctly interprets nested parentheses like ((word)) for increased emphasis or nested brackets [[word]] for further de-emphasis, applying the multipliers cumulatively.
  • Visual Data Breakdown: For each word, the tool displays the final numerical weight, the percentage increase or decrease from the baseline (1.0), and a relative bar graph for quick visual comparison.
  • Phrase Deconstruction: When you apply a weight to a multi-word phrase, such as (best quality:1.2), the tool correctly applies the specified weight to each individual word within that phrase.

🧐 Frequently Asked Questions (FAQ)

Q. How are weights for (word) and [word] calculated?

A. This tool simulates the standard convention used by many Stable Diffusion interfaces. A word enclosed in parentheses () has its weight multiplied by 1.1. A word enclosed in square brackets [] has its weight divided by 1.1 (multiplied by ~0.909). Nesting the brackets applies the calculation multiple times, so ((word)) is equivalent to a weight of 1.21 (1.1 * 1.1). A number after a colon only sets a weight inside parentheses, such as (word:1.5); outer parentheses still multiply it, so ((word:1.5)) is 1.65. A number inside square brackets, such as [word:0.8], is not a weight: AUTOMATIC1111 reads it as prompt editing, which adds the word partway through the sampling steps.

Q. Which AI models use this specific syntax?

A. This () and [] syntax comes from the AUTOMATIC1111 Web UI for Stable Diffusion. ComfyUI also reads (word) and (word:1.2), but square brackets [word] do not change the weight there. It's important to note that other models, such as Midjourney, use a different syntax for weighting (e.g., word::1.5). This tool is specifically for the former.

📚 Technical Insights: The Mechanics of Prompt Weighting

Prompt weighting, also known as emphasis or attention, is a technique to control how much influence a specific token (word) has on the final image generation process. The syntax simulated here became a de facto standard after its implementation in popular open-source UIs. By default, every word in a prompt has a neutral weight of 1.0.

  • Emphasis (Weight > 1.0): Instructs the AI to pay more attention to a concept. This is useful for ensuring a key subject is prominent, or for applying a specific style more strongly. For example, (masterpiece:1.5) heavily biases the output towards a high-quality aesthetic.
  • De-emphasis (Weight < 1.0): Instructs the AI to pay less attention to a concept. This is a powerful tool for reducing unwanted elements or toning down an overbearing style without adding it to a negative prompt. For instance, (blurry:0.8) or [blurry] (about 0.909) would slightly reduce the chances of a blurry result. Numeric weights only work inside parentheses ( ).

Mastering these weights allows for a granular level of control far beyond simply listing words. It enables artists and engineers to fine-tune character attributes, scene composition, and artistic style with much greater precision.