negative prompt
In plain wordsA second prompt listing what you do not want in a generated image — 'blurry, extra fingers, watermark' — which the generator then steers away from.
Text supplied to a diffusion modeldiffusion model, n.: An AI that learns to create images, sound or video by practicing noise removal: shown pictures buried under static, it learns to clean them up, then builds new ones starting from pure static. or flow matchingflow matching, n.: A way to train generators that learns, for every point between random noise and real data, which direction to move, so that noise can be steered smoothly into new examples. image generator to describe content or qualities to avoid. It is implemented through classifier-free guidanceclassifier-free guidance, n.: A setting that makes an image generator follow the prompt more strictly by comparing what it would draw with and without the prompt, then exaggerating the difference.: the prediction conditioned on the negative prompt replaces the unconditional (empty-prompt) prediction, so each sampling step moves toward the positive prompt and away from the negative one in proportion to the guidance scale. Common uses include suppressing artifacts ('blurry, low quality, watermark'), unwanted objects or styles. Because it acts through the guidance arithmetic, a negative prompt has no effect at a guidance scale of 1 (where the unconditional branch cancels out) and is unavailable in models distilled to run without guidance unless they add separate support; some tools apply it only in later steps or rescale it to avoid over-correction.
Add 'text, watermark' to the negative prompt and the stock-photo banners disappear.
Origin
Composable Diffusion (Nan Liu and colleagues, June 2022) had already defined 'concept negation', subtracting the guidance of an unwanted concept. The now-standard form, substituting user text for the empty unconditional prompt, appeared in the open-source AUTOMATIC1111 Stable Diffusion web interface at the end of August 2022; its developer believed this to be the first such use. The feature spread to most image tools within months.
Related
- classifier-free guidanceclassifier-free guidance, n.: A setting that makes an image generator follow the prompt more strictly by comparing what it would draw with and without the prompt, then exaggerating the difference.
- promptprompt, n.: The message or instructions you give an AI system — a question, a request, some examples or a document — that it responds to. Clearer prompts generally get better results.
- text-to-image modeltext-to-image model, n.: An AI system that creates a picture from a written description, such as 'a fox reading a newspaper, in watercolor', usually within seconds.
- Stable DiffusionStable Diffusion, prop. n.: A widely used image-generating AI whose model files were released for anyone to download, so people could run it on their own computers and adapt it.
- prompt engineeringprompt engineering, n.: The skill of writing requests to an AI — picking the words, examples, format and background information it receives — so that it reliably gives the result you want, without retraining it.
Sources
- AUTOMATIC1111 (2022). Negative prompt. stable-diffusion-webui wiki, GitHub. github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Negative-prompt
- Liu, N., Li, S., Du, Y., Torralba, A. & Tenenbaum, J. B. (2022). Compositional Visual Generation with Composable Diffusion Models. ECCV 2022. arXiv:2206.01714. arxiv.org/abs/2206.01714
Mentioned in
promptprompt, n.: The message or instructions you give an AI system — a question, a request, some examples or a document — that it responds to. Clearer prompts generally get better results., text-to-image modeltext-to-image model, n.: An AI system that creates a picture from a written description, such as 'a fox reading a newspaper, in watercolor', usually within seconds., classifier-free guidanceclassifier-free guidance, n.: A setting that makes an image generator follow the prompt more strictly by comparing what it would draw with and without the prompt, then exaggerating the difference., diffusion distillationdiffusion distillation, n.: Training a fast image generator to imitate a slow diffusion model, so that a picture that once took fifty steps can be made in one to four., textual inversiontextual inversion, n.: Teaching an image generator a new 'word' for a specific object or style from a few example pictures, leaving the model itself unchanged — only one vocabulary entry is added.