Prompt Weight Editor

Share:

Set per-term attention weights for a Stable Diffusion prompt and rebuild it in (term:1.25) AUTOMATIC1111 syntax. Free, runs in your browser.

RT-AI-021 · AI Tools
Your browser is too old for this tool’s interactive features. Please update to Safari 13.1, Chrome or Edge 80, Firefox 74 or newer.

Prompt Weight Editor

Weighted prompt (AUTOMATIC1111 syntax)

Advertisement
After tool · AD-W1Responsive · Post-tool

How to Use the Prompt Weight Editor

Paste your prompt

Type or paste a comma-separated Stable Diffusion prompt into the box. Each phrase between commas — "a red fox", "snowy forest", "soft morning light" — becomes its own row you can weight. A term you paste already weighted, such as (a red fox:1.3), arrives at that weight instead of being wrapped a second time.

Adjust the weights

Use the − and + buttons or type a number to set each term's attention weight from 0.1 to 2.0 (default 1.0). Push a term above 1.0 to emphasise it; drop it below 1.0 to de-emphasise.

Read the rebuilt prompt

The output rebuilds live in AUTOMATIC1111 syntax: a term at 1.0 stays bare, while anything else becomes (term:1.25). Tweak weights until the balance looks right.

Copy into your UI

Hit Copy and paste the weighted prompt into AUTOMATIC1111, ComfyUI, or any compatible Stable Diffusion interface. Everything runs in your browser — nothing is uploaded.

Advertisement
After how-to · AD-W2Responsive

Attention Weighting Is How You Steer Stable Diffusion

What (term:1.2) actually does to your image

When Stable Diffusion reads your prompt, it converts every word into tokens and pays a certain amount of attention to each one while it denoises the image. By default each token carries equal pull. Attention weighting — the (term:1.2) syntax popularised by the AUTOMATIC1111 web UI — lets you tilt that balance deliberately. A weight above 1.0 tells the model "lean into this"; a weight below 1.0 says "ease off". So (snowy forest:1.3) makes the snow and trees dominate the scene, while (background clutter:0.6) quietly pushes distractions away without removing them entirely.

The number is a multiplier, not a hard switch: in AUTOMATIC1111 it scales that token's output from the text encoder before the image is conditioned on it. The parser accepts any number; the limits are practical ones. Small nudges usually go further than big jumps — moving a term from 1.0 to 1.15 is a common first try for a detail the model keeps dropping, while weights around 1.8 and above often over-bake the image, with blown-out colours, warped anatomy and a composition that collapses around that one idea. These are rules of thumb that vary by checkpoint, not documented thresholds. This editor steps in increments of 0.05 and keeps to 0.1–2.0 for that reason. Brackets still work in AUTOMATIC1111: each ( ) layer multiplies by exactly 1.1, so ((term)) is 1.21, and each [ ] layer divides by 1.1 (about 0.91). The explicit (term:1.2) form sets any value in one step, and it means the same thing in ComfyUI, which has no square-bracket rule at all.

"A prompt lists what you want in the picture. Weights decide which of those things the model actually fights for."

Why a structured editor beats hand-typing brackets

Typing weighted prompts by hand is fiddly and error-prone: a missing colon, an unbalanced parenthesis, or a runaway ((((term)))) can quietly distort a generation or break parsing altogether. Splitting the prompt into one row per term turns weighting into a dial you can see. You scan the whole prompt at a glance, spot which ideas are competing, and rebalance them without rewriting the text — bump the subject up, trim the lighting down, leave the rest at a neutral 1.0. Because a bare term and a 1.0 weight are identical to the model, the editor keeps the output clean, only wrapping the terms you actually changed so the prompt stays readable. Brackets that are part of a term — anime (character) — are written as \( and \), the escape AUTOMATIC1111 and ComfyUI both document, so the parser reads them as text instead of as an extra ×1.1. The syntax it emits is the de-facto standard understood by AUTOMATIC1111, ComfyUI, Forge, and most modern Stable Diffusion front-ends, so the result drops straight into your workflow. And since everything happens locally in plain JavaScript, your prompts — which often encode a creative idea you have not shipped yet — never leave the page. Fill the box, nudge the weights, copy the result, and iterate until the emphasis matches the image in your head.

Weighting a term down keeps it in the scene but quieter

01

A weight is a multiplier on a token's attention — above 1.0 emphasises, below 1.0 de-emphasises.

02

The (term:1.2) syntax was popularised by the AUTOMATIC1111 web UI and is now the de-facto standard.

03

A term at weight 1.0 is identical to a bare term — so it is left unwrapped.

04

In AUTOMATIC1111, (term) is ×1.1, ((term)) ×1.21 and [term] ÷1.1 (≈0.91). ComfyUI reads only the round brackets.

05

A small nudge — 1.0 to 1.15 — is the usual first try for a detail the model keeps dropping.

06

No parser caps the number, but weights around 1.8+ often blow out colours and warp anatomy around that one idea.

07

You can weight any phrase, not just single words: (soft morning light:1.3) works fine.

08

Weighting down a term keeps it in the scene but quieter — better than deleting it outright.

09

The explicit (term:1.2) form is read the same way by ComfyUI and Forge; a literal round bracket needs a backslash in all three.

10

This editor runs entirely in your browser — your prompts are never uploaded.

📅 Research current as of 26 Oct 2026 · Sources: Syntax checked against AUTOMATIC1111's parser (prompt_parser.py) and wiki, and ComfyUI's README and sd1_clip.py.
Standards, published formulas, and reference data are revised over time — check against a current authoritative source before relying on these figures.

Frequently Asked Questions

  • It multiplies the attention the model pays to that term. A value above 1.0 emphasises the term so it shows up more strongly in the image; a value below 1.0 de-emphasises it. The form was popularised by the AUTOMATIC1111 web UI and is now the standard way to weight prompts.
  • This editor allows 0.1 to 2.0 in steps of 0.05, with 1.0 as the neutral default. Most useful tweaks live between about 0.6 and 1.5 — small nudges go a long way, and very high weights tend to over-bake the image.
  • A term at weight 1.0 is identical to a bare term, so the editor leaves it unwrapped to keep the prompt clean. Only the terms you actually changed get the (term:weight) wrapper.
  • The (term:1.2) form is read by AUTOMATIC1111, ComfyUI, Forge, and most modern front-ends. NovelAI is the best-known exception: it uses {term} at ×1.05 a layer, which AUTOMATIC1111's wiki gives as (term:1.05). Check your specific UI if a prompt behaves unexpectedly.
  • Yes. Each comma-separated chunk is treated as one term, so "soft morning light" becomes a single row and is wrapped as (soft morning light:1.3) if you change its weight. Brackets inside a phrase are escaped for you, so anime (character) stays one term.
  • Brackets are not obsolete — AUTOMATIC1111 still reads them — but they only come in steps: each ( ) layer multiplies by exactly 1.1, so ((term)) is 1.21, and each [ ] layer divides by 1.1, about 0.91. The explicit (term:1.2) form sets an exact value in one go, and ComfyUI, which ignores square brackets, reads it the same way. That is why this editor writes it.
  • Yes. When you re-edit the prompt box, any term whose text is unchanged keeps its weight. New terms start at the neutral default of 1.0 — or, if you paste a term already weighted such as (fox:1.2), at that weight, so it is never wrapped twice — and removed terms simply drop off.
  • Not reliably. The parser accepts any number, but past roughly 1.5–1.8 the image often degrades — colours blow out, anatomy warps, and the composition collapses around that one idea. That range is experience, not a documented limit, and it varies by model. If a term is being ignored, try a small bump first, or reduce competing terms instead.
  • No. The whole tool runs in your browser with plain JavaScript. Nothing you type is sent to any model, server, or third party, and nothing is saved.
  • Completely free, with no account or sign-up and no limit on use. It runs in your browser and collects no data.

Method & sources

How it computes

Comma-separated terms, each with a weight 0.1–2.0 in steps of 0.05. A term at 1.00 is written bare; any other as (term:w) with two decimals, the explicit form AUTOMATIC1111, Forge and ComfyUI all read. Literal brackets in a term are escaped as \( \) \[ \]; a term pasted already weighted is unwrapped to its weight (PromptWeightKernel, checked by reading the output back with a port of AUTOMATIC1111's parser).

What this tool implements

  • Syntax as AUTOMATIC1111's own parser reads it: (term:w) multiplies by w, each ( ) layer by 1.1 and each [ ] layer divides by 1.1; \( \) \[ \] are literal. ComfyUI reads (term:w) and ( ) the same way and has no [ ] rule, so the editor writes only the explicit form.
  • Every output is read back in the test suite with a line-for-line port of parse_prompt_attention, whose own doctests are pinned: the parser must give each term the weight the editor shows.
  • The weight ranges the page suggests (a first nudge of about 1.15, trouble above about 1.8) are practitioners' rules of thumb and say so; no parser limits the number. The 0.1–2.0 range is this editor's choice.
  • Corrected 2026-10-26: literal brackets in a term were not escaped, so "anime (character)" gave "character" a further ×1.1; a pasted "(fox:1.2)" was weighted again as "((fox:1.2):1.30)"; ((term)) was described as ~1.1× (it is 1.21×) and [term] as ~0.9× (it is ÷1.1, about 0.91); the page said the explicit form "replaced" brackets, which AUTOMATIC1111 still reads; the source reference belonged to a different tool.

Sources

Advertisement
Pre-footer · AD-W3 728 × 90