Stable Diffusion (A1111) Commands & Prompt Reference
36 commands & parameters · 3 categories · Source: AUTOMATIC1111 WebUI Wiki — Features
AUTOMATIC1111's WebUI gives Stable Diffusion a prompt language of its own, and it has three layers. Attention weighting comes first: parentheses raise a token's influence by 1.1 per level, square brackets lower it, and an explicit weight like (word:1.5) replaces the guesswork. Prompt editing comes second - [from:to:when] swaps text partway through sampling, [to:when] adds text after a step, and [cow|horse] alternates every step. Extra networks come third, with LoRA, hypernetworks, and textual inversion embeddings all addressed inline in the prompt.
On top of that sits a scripting layer most users never touch but which pays off for systematic work. Prompt matrix splits alternatives on the pipe character and renders every combination. The Prompts from file script queues whole jobs, each line carrying its own --prompt, --steps, --cfg_scale, --sampler_name, and seed fields. And X/Y/Z plot builds comparison grids from ranges written as 1-5, 1-5 (+2), or 1-10 [5], with Prompt S/R substituting text across the axis.
Two syntax details cause most of the confusion. BREAK must be uppercase and pads the current 75-token chunk before starting a new one, which is how long prompts are segmented. And AND, also uppercase, triggers composable diffusion rather than being read as a word - useful for combining subjects, and it accepts per-part weights.
Also see: Stable Diffusion WebUI keyboard shortcuts.
All Commands
Prompt Syntax & Weights (15)
| Command / Syntax | What it does | Notes |
|---|---|---|
| (word) | Increase attention to word by a factor of 1.1 | Wrap any prompt token in parentheses. |
| ((word)) | Increase attention by 1.21 (1.1 x 1.1) | Stack parentheses to multiply the effect. |
| [word] | Decrease attention to word by a factor of 1.1 | Square brackets reduce emphasis; no numeric weight allowed. |
| (word:1.5) | Set an explicit attention weight on word | Weights work with () only. Default weight is 1.1. |
| (word:0.25) | Decrease attention by an explicit factor | Values below 1 reduce influence (0.25 = quarter strength). |
| \(word\) | Use literal parentheses characters in the prompt | Escape with backslashes: anime_\(character\). |
| BREAK | Fill the current 75-token chunk with padding and start a new chunk | Must be uppercase. Controls how long prompts are split. |
| [from:to:when] | Prompt editing: swap from one text to another mid-sampling | when is a step number or a 0.0-1.0 fraction of steps. |
| [to:when] | Add text to the prompt after a fixed number of steps | Adds the to text once step when is reached. |
| [from::when] | Remove text from the prompt after a fixed number of steps | Drops the from text once step when is reached. |
| [cow|horse] | Alternating words: swap tokens every other sampling step | Step 1 uses cow, step 2 horse, and so on. |
| prompt1 AND prompt2 | Composable diffusion: combine multiple prompts | AND must be uppercase. Supports weights: a cat :1.2 AND a dog. |
| <lora:filename:multiplier> | Apply a LoRA at the given strength | Filename without extension; multiplier usually 0-1. Not allowed in the negative prompt. |
| <hypernet:filename:multiplier> | Apply a Hypernetwork at the given strength | Same syntax family as LoRA extra networks. |
| embedding-filename | Trigger a Textual Inversion embedding by its filename | Place the embedding's filename anywhere in the prompt. |
Script & Job Syntax (17)
| Command / Syntax | What it does | Notes |
|---|---|---|
| a|b|c | Prompt matrix: generate one image for every combination of the parts | Separate alternatives with the pipe character; the first part is always kept. Script -> Prompt matrix. |
| {prompt} | Style placeholder: substitute the current prompt into the saved style at that position | Without it, a style is appended to the prompt instead of wrapping it. Saved in styles.csv. |
| --prompt "text" | Prompts-from-file job field: the positive prompt for one queued job | One job per line in the Prompts from file or textbox script. |
| --negative_prompt "text" | Prompts-from-file job field: things the model should avoid | Used as unconditional conditioning instead of an empty string. |
| --steps N | Prompts-from-file job field: sampling steps for that job | Overrides the UI value for the single queued job. |
| --cfg_scale N | Prompts-from-file job field: classifier-free guidance scale | Higher values follow the prompt more strictly. |
| --sampler_name "name" | Prompts-from-file job field: sampling method | Example: DPM++ 2M Karras, DDIM. |
| --seed N | Prompts-from-file job field: fixed starting noise | Reuse a seed to reproduce a composition. |
| --subseed N | Prompts-from-file job field: variation seed | Paired with subseed_strength to blend between two seeds. |
| --subseed_strength N | Prompts-from-file job field: how far to move toward the variation seed | At maximum you get the subseed image, at minimum the original seed. |
| --width N | Prompts-from-file job field: output width | Set per job in the queued list. |
| --height N | Prompts-from-file job field: output height | Set per job in the queued list. |
| --batch_size N | Prompts-from-file job field: images generated in parallel per batch | Limited by available VRAM. |
| --n_iter N | Prompts-from-file job field: number of batches to run | Total images equal batch_size multiplied by n_iter. |
| --styles "name" | Prompts-from-file job field: apply a saved style to the job | Styles come from styles.csv. |
| --seed_resize_from_w N | Prompts-from-file job field: original width for seed resizing | Keeps a known seed looking similar at a different resolution. |
| --seed_resize_from_h N | Prompts-from-file job field: original height for seed resizing | Paired with seed_resize_from_w; ancestral samplers hold this less well. |
X/Y/Z Plot & Prompt S/R Syntax (4)
| Command / Syntax | What it does | Notes |
|---|---|---|
| 1-5 | X/Y/Z plot value range: expands to every integer in the range | Entered in the X, Y, or Z values field. |
| 1-5 (+2) | X/Y/Z plot range with an increment in parentheses | Expands to 1, 3, 5. Negative increments count down: 10-5 (-3). |
| 1-10 [5] | X/Y/Z plot range with a count in square brackets | Expands to that many evenly spaced values: 1, 3, 5, 7, 10. |
| darkness,"light, green",heat | Prompt S/R list where a value itself contains a comma | Quote the value with no space after the preceding comma, or it is split into separate items. |
Recipes
Our own notes on combining the commands above. Every token used here appears in the reference tables on this page.
Emphasise a token without guessing at parentheses
(word:1.2) instead of ((word))
Each parenthesis level multiplies attention by 1.1, so ((word)) is 1.21 and stacking gets hard to reason about. An explicit weight says exactly what you mean, and values below 1 reduce influence. Square brackets reduce attention but do not accept a numeric weight.
Stop a long prompt from bleeding concepts together
subject description BREAK style description
BREAK (uppercase) pads the current 75-token chunk and starts a new one, which controls where the prompt is split rather than letting it fall wherever the token count lands. Useful when a style keyword starts contaminating the subject.
Change the subject partway through sampling
[from:to:when]
Prompt editing swaps text mid-sampling, where when is a step number or a 0.0-1.0 fraction. The early steps set composition and the later steps set detail, so swapping late changes surface treatment while keeping the layout.
Combine two subjects without one absorbing the other
prompt1 :1.2 AND prompt2
Composable diffusion with an uppercase AND treats the parts as separate conditionings rather than one blended prompt, and each part takes its own weight. This is the tool for two distinct subjects; attention weighting alone tends to merge them.
Compare settings systematically instead of by eye
X/Y/Z plot + 1-10 [5] + Prompt S/R
Range syntax expands automatically: 1-5 gives every integer, 1-5 (+2) steps by two, and 1-10 [5] gives five evenly spaced values. Prompt S/R substitutes text across an axis. Quote any value containing a comma, with no space after the preceding comma, or it splits into separate items.
Queue a batch of jobs with different settings
--prompt "..." --steps N --cfg_scale N --sampler_name "..." --seed N
The Prompts from file script runs one job per line, each carrying its own parameters. This is how you leave a comparison running rather than babysitting the UI, and it records exactly what produced each output.
Frequently Asked Questions
How do I emphasize a word in a Stable Diffusion prompt?
Wrap it in parentheses to raise attention by 1.1, stack them to multiply, or set an explicit weight with (word:1.5). Square brackets reduce attention but do not accept a numeric weight.
What is the difference between BREAK and AND?
Both must be uppercase. BREAK pads the current 75-token chunk and starts a new one. AND triggers composable diffusion, combining separate prompts, and supports per-part weights.
How do I compare settings side by side?
Use the X/Y/Z plot script. Values accept ranges such as 1-5, 1-5 (+2) for an increment, or 1-10 [5] for a fixed count. Prompt S/R substitutes text across an axis.
Every entry on this page is a literal, typeable token taken from the official documentation linked above. Command sets in AI tools change quickly - the in-product command menu is always authoritative for your installed version.