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 / SyntaxWhat it doesNotes
(word)Increase attention to word by a factor of 1.1Wrap 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.1Square brackets reduce emphasis; no numeric weight allowed.
(word:1.5)Set an explicit attention weight on wordWeights work with () only. Default weight is 1.1.
(word:0.25)Decrease attention by an explicit factorValues below 1 reduce influence (0.25 = quarter strength).
\(word\)Use literal parentheses characters in the promptEscape with backslashes: anime_\(character\).
BREAKFill the current 75-token chunk with padding and start a new chunkMust be uppercase. Controls how long prompts are split.
[from:to:when]Prompt editing: swap from one text to another mid-samplingwhen 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 stepsAdds the to text once step when is reached.
[from::when]Remove text from the prompt after a fixed number of stepsDrops the from text once step when is reached.
[cow|horse]Alternating words: swap tokens every other sampling stepStep 1 uses cow, step 2 horse, and so on.
prompt1 AND prompt2Composable diffusion: combine multiple promptsAND must be uppercase. Supports weights: a cat :1.2 AND a dog.
<lora:filename:multiplier>Apply a LoRA at the given strengthFilename without extension; multiplier usually 0-1. Not allowed in the negative prompt.
<hypernet:filename:multiplier>Apply a Hypernetwork at the given strengthSame syntax family as LoRA extra networks.
embedding-filenameTrigger a Textual Inversion embedding by its filenamePlace the embedding's filename anywhere in the prompt.

Script & Job Syntax (17)

Command / SyntaxWhat it doesNotes
a|b|cPrompt matrix: generate one image for every combination of the partsSeparate 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 positionWithout 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 jobOne job per line in the Prompts from file or textbox script.
--negative_prompt "text"Prompts-from-file job field: things the model should avoidUsed as unconditional conditioning instead of an empty string.
--steps NPrompts-from-file job field: sampling steps for that jobOverrides the UI value for the single queued job.
--cfg_scale NPrompts-from-file job field: classifier-free guidance scaleHigher values follow the prompt more strictly.
--sampler_name "name"Prompts-from-file job field: sampling methodExample: DPM++ 2M Karras, DDIM.
--seed NPrompts-from-file job field: fixed starting noiseReuse a seed to reproduce a composition.
--subseed NPrompts-from-file job field: variation seedPaired with subseed_strength to blend between two seeds.
--subseed_strength NPrompts-from-file job field: how far to move toward the variation seedAt maximum you get the subseed image, at minimum the original seed.
--width NPrompts-from-file job field: output widthSet per job in the queued list.
--height NPrompts-from-file job field: output heightSet per job in the queued list.
--batch_size NPrompts-from-file job field: images generated in parallel per batchLimited by available VRAM.
--n_iter NPrompts-from-file job field: number of batches to runTotal images equal batch_size multiplied by n_iter.
--styles "name"Prompts-from-file job field: apply a saved style to the jobStyles come from styles.csv.
--seed_resize_from_w NPrompts-from-file job field: original width for seed resizingKeeps a known seed looking similar at a different resolution.
--seed_resize_from_h NPrompts-from-file job field: original height for seed resizingPaired with seed_resize_from_w; ancestral samplers hold this less well.

X/Y/Z Plot & Prompt S/R Syntax (4)

Command / SyntaxWhat it doesNotes
1-5X/Y/Z plot value range: expands to every integer in the rangeEntered in the X, Y, or Z values field.
1-5 (+2)X/Y/Z plot range with an increment in parenthesesExpands to 1, 3, 5. Negative increments count down: 10-5 (-3).
1-10 [5]X/Y/Z plot range with a count in square bracketsExpands to that many evenly spaced values: 1, 3, 5, 7, 10.
darkness,"light, green",heatPrompt S/R list where a value itself contains a commaQuote 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.

Related prompt references

Midjourney (38) · Kling AI (24) · Vidu (24) · All AI prompt references