Stable Diffusion prompt syntax: parentheses, brackets, weights, and BREAK
Stable Diffusion's prompt syntax controls how much attention the model gives each word. Parentheses, brackets, numeric weights, and the BREAK keyword each do something specific. This is the practical reference: what each token does, the exact math, and the edge cases worth knowing.
What do parentheses and brackets do in Stable Diffusion prompts?
Parentheses and brackets modify the model's attention on the words inside them. Parentheses () increase attention; square brackets [] decrease it. The default multiplier for both is ~1.1, so (word) gets roughly 1.1x attention and [word] gets roughly 0.91x (since 1/1.1 ≈ 0.91).
Example: "I want to see a (beautiful) [scary] forest."
The model gives more attention to "beautiful" and less to "scary." The image will lean toward beautiful imagery; scary elements will be muted.
How does the (word:1.2) weight syntax work in Stable Diffusion?
You can set an explicit numeric weight using (word:weight). The number is the exact multiplier. (word:1.5) is 1.5x attention. (word:0.5) is half attention. (word:2.0) is double.
Example: "I want to see a (beautiful:1.5) (scary:0.5) [haunted:0.25] forest."
Here "beautiful" gets 1.5x attention and "scary" gets 0.5x. Note that [haunted:0.25] is invalid: numeric weights only work inside parentheses, not brackets. If you want to decrease attention below 0.91x, use parentheses with a fractional weight: (haunted:0.25).
What do nested parentheses like ((word)) do in Stable Diffusion?
Stacking parentheses or brackets compounds the multiplier. Each additional layer multiplies the previous level by ~1.1 (for parentheses) or divides by ~1.1 (for brackets).
(word)≈ 1.1x((word))≈ 1.21x (1.1 × 1.1)(((word)))≈ 1.33x (1.1 × 1.1 × 1.1)[word]≈ 0.91x[[word]]≈ 0.83x[[[word]]]≈ 0.75x
Example: "I want to see a (((beautiful))) [[scary]] forest."
Beautiful gets about 1.33x attention; scary gets about 0.83x.
In practice, anything beyond two or three layers of nesting becomes hard to predict, and explicit numeric weights ((word:1.4)) are easier to reason about. Use stacking for quick adjustments, numeric weights when precision matters.
How do you escape parentheses and brackets in Stable Diffusion?
If you want literal parenthesis or bracket characters in your prompt without changing attention, escape them with a backslash.
Example: "An anime character with a move called \(SuperPunch\)."
The backslashes tell the parser that the parentheses are part of the text, not attention modifiers. The model treats "SuperPunch" as a literal phrase with parentheses around it rather than emphasizing it.
What does the BREAK keyword do in Stable Diffusion prompts?
Stable Diffusion's CLIP text encoder processes prompts in chunks of 75 tokens. Prompts longer than 75 tokens get split, and each chunk is processed independently before being concatenated for the diffusion process.
Without BREAK, the chunk boundary falls wherever your prompt happens to hit the 75-token mark. That can split a phrase awkwardly and give the second chunk less coherent context.
BREAK (uppercase, treated as a keyword) lets you control the boundary. It ends the current chunk early, pads it with empty tokens, and starts the next chunk fresh.
Example: "A serene mountain landscape with snow-capped peaks at golden hour... BREAK A small wooden cabin in the foreground with smoke rising from the chimney."
The model processes each chunk with full attention to its content. Useful for prompts that combine two distinct scene elements you want to keep separated.
What do nested parentheses with multiple sets do mathematically?
Nesting is just repeated multiplication. The formula for parentheses is 1.1^n where n is the number of layers. For brackets it's (1/1.1)^n ≈ 0.909^n.
((((word))))≈ 1.46x(((((word)))))≈ 1.61x[[[[word]]]]≈ 0.68x
Past three layers, explicit numeric syntax (word:1.5) becomes far more readable than counting parentheses.
Does Pony Diffusion use the same prompt syntax as Stable Diffusion?
Yes. Pony Diffusion is a Stable Diffusion fine-tune, so it inherits the same prompt syntax:
- Parentheses
(word)for emphasis - Square brackets
[word]for de-emphasis - Numeric weights
(word:1.5) - The
BREAKkeyword for chunk separation - Backslash escaping for literal characters
This also applies to SDXL, SD 1.5, SD3, and most SD-derived models you'll encounter, and it works the same across the common interfaces: Automatic1111, Forge, Fooocus, InvokeAI, and ComfyUI (which reads the same (word:1.5) weighting through its prompt nodes). The main exception is NAI (NovelAI), which uses curly braces {word} and a different multiplier. See the next section.
How does NAI's curly-brace syntax compare to Stable Diffusion's (word)?
NovelAI uses a similar prompt-weighting system but with two differences: curly braces {} instead of parentheses, and a 1.05 multiplier instead of 1.1. The conversion between the two:
- NAI's
{word}≈ Stable Diffusion's(word:1.05) - NAI's
{{word}}≈ Stable Diffusion's(word:1.1025)(1.05²) - NAI's
[word]≈ Stable Diffusion's(word:0.952)(1 / 1.05) - NAI's
[[word]]≈ Stable Diffusion's(word:0.907)(1 / 1.05²)
Example (NAI): "A {beautiful} [scary] forest."
Example (SD equivalent): "A (beautiful:1.05) (scary:0.952) forest."
NAI's tighter multiplier (1.05 vs. 1.1) means you typically need more nesting to get the same effect. Most other SD-based ecosystems stick with the 1.1 convention.
Does this prompt syntax work in Midjourney, DALL-E, or Grok?
No. Parentheses, brackets, and (word:1.5) weights are specific to Stable Diffusion and its fine-tunes. Other image tools use their own systems, or none at all:
- Midjourney uses
::for prompt weights (cat::2 dog::1) and--nofor negatives. No parentheses. - DALL-E 3, Grok (Aurora), Flux, Ideogram, and Imagen take natural-language prompts with no weighting syntax. Typing
(word:1.5)in those tools just adds literal parentheses to the prompt. - NovelAI uses curly braces
{word}(covered above).
The rule of thumb: the (word) / [word] / (word:1.5) / BREAK syntax belongs to the Stable Diffusion ecosystem (SD 1.5, SDXL, SD3, Pony, and similar fine-tunes). If a tool isn't SD-based, assume the syntax doesn't carry over.
What about the <lora:name:weight> tag?
The <lora:name:weight> tag is different from prompt weights, even though both use a number. (word:1.5) adjusts how much attention the model pays to a word already in your prompt. <lora:name:0.8> loads a separate LoRA model and scales its overall strength. One controls text attention; the other controls a model add-on. They often appear in the same prompt and are easy to confuse. For how LoRA models work, where to find them, and how the tag is structured, see our beginner's guide to LoRAs.
Quick reference card
| Syntax | Effect | Multiplier |
|---|---|---|
(word) | Increase attention | ~1.1x |
[word] | Decrease attention | ~0.91x |
((word)) | Stack increase | ~1.21x |
(((word))) | Stack increase | ~1.33x |
(word:1.5) | Explicit weight | 1.5x |
(word:0.5) | Explicit weight | 0.5x |
| Literal parentheses | None |
BREAK | Start new 75-token chunk | N/A |
(NAI only) | Increase attention | ~1.05x |
Frequently asked
What do parentheses (word) do in Stable Diffusion prompts?›1x. 1).
What does (word:1.5) mean in Stable Diffusion?›5x. Values above 1 increase attention; values below 1 decrease it.
What is the difference between (word) and [word] in Stable Diffusion?›1x. 1x.
What does BREAK do in a Stable Diffusion prompt?›BREAK (uppercase, treated as a special keyword) ends the current 75-token chunk and starts a new one with fresh attention.
How do you escape parentheses in Stable Diffusion prompts?›Use a backslash to escape: \(literal\) or \[literal\]. This is for cases where you want the parenthesis characters to appear in the generated image or text (rare for image gen, more common when the prompt text itself includes a name or term with parentheses).
Does Pony Diffusion use the same prompt syntax as Stable Diffusion?›Yes. 5) for explicit weights, BREAK for chunk separation.
What is the 75-token limit in Stable Diffusion?›Stable Diffusion's text encoder (CLIP) processes prompts in 75-token chunks.
Does SDXL use the same prompt syntax as Stable Diffusion 1.5?›Yes. 5) for explicit weights, and BREAK for chunk separation.
Does this syntax work in ComfyUI and Automatic1111?›Yes. 5), and stacking syntax works in Automatic1111, Forge, Fooocus, and InvokeAI.
Does Stable Diffusion prompt syntax work in Midjourney or DALL-E?›No. 5) weights are specific to Stable Diffusion and its fine-tunes.
How is the <lora:name:weight> tag different from prompt weights?›The <lora:name:weight> tag loads a LoRA model and scales its overall strength.
Considered takes, in your inbox.
We write when we learn something worth sharing. No schedule, no marketing digests. Built for engineers and product owners shipping with agents.