Negative prompt

Also known as: negative prompting

On this page 7

A negative prompt is a secondary text input that describes what a generative model should avoid producing, such as unwanted objects, styles or visual defects. In prompting for image and video diffusion models, it works through classifier-free guidance: the model is pushed toward the main prompt and actively pushed away from the negative one at every denoising step.

The practice, also called negative prompting, became widespread with open diffusion models in artificial intelligence, where interfaces expose a dedicated negative field next to the main prompt. Language models have no equivalent mechanism; there, avoidance must be expressed as ordinary instructions inside the prompt, which behave quite differently.

How a negative prompt steers the denoising process

A negative prompt works by replacing the unconditional prediction in classifier-free guidance. At each step, a diffusion model predicts the noise twice: once conditioned on the positive prompt and once on a second text embedding. Without a negative prompt, that second embedding is an empty string; with one, it encodes the unwanted concepts.

The sampler then combines the two predictions as guided = negative + scale × (positive − negative). The guidance scale amplifies the difference, so features associated with the negative text are subtracted from the update direction. The effect accumulates over 20 to 50 sampling steps, which is why a negative prompt can reshape composition, not only remove details.

The following table lists the parameters that determine how strongly a negative prompt acts.

ParameterTypical rangeEffect on the negative prompt
Guidance scaleAbout 4 to 9 for most modelsHigher values push harder away from negatives
Token weighting0.5 to 1.5 per phraseEmphasizes or softens individual negative terms
Sampling steps20 to 50More steps give guidance more opportunities to act
Negative embeddingOne learned tokenPacks many defects into a compact vector
Text encoder limit77 tokens per chunk in CLIPLong negative lists may be truncated or chunked
Parameters that govern negative prompt strength

Types of negative prompts

Negative prompts fall into a few recognizable categories, and mixing too many categories in one field is a frequent cause of flat, over-constrained images. Each type targets a different failure of the base model.

CategoryExample phrasesPurpose
Quality defectsblurry, low resolution, jpeg artifactsSuppress technical flaws
Anatomy errorsextra fingers, deformed handsReduce structural mistakes in figures
Unwanted objectstext, watermark, frame, logoRemove specific elements
Style exclusioncartoon, 3D render, oversaturatedKeep a photographic or painterly look
Content safetynudity, goreSupport moderation goals, not guarantee them
Common categories of negative prompt content

A related technique is the negative embedding, a token trained with textual inversion on examples of bad outputs. Placing that token in the negative field condenses a long list of defects into a single learned concept, although its effect is tied to the base model it was trained on.

A negative prompt is one of several ways to control what a model avoids, and it is often confused with prompt weighting and with negative instructions for language models. The mechanisms differ substantially.

TechniqueMechanismMain limitation
Negative promptReplaces the unconditional branch of guidanceNeeds true classifier-free guidance
Prompt weightingScales token embeddings up or downCannot exclude a concept on its own
Negative instruction in an LLM promptOrdinary text the model readsNaming a concept can prime it
Output format instructionConstrains structure of the answerDoes not suppress topics or styles
Inpainting maskRegenerates only a selected regionRequires an existing image
How negative prompts relate to neighboring techniques

In large language models, a sentence such as “do not mention pricing” is processed like any other text, and research and practice show that positive phrasing is usually more reliable: describing the desired behavior works better than listing what to avoid.

Writing effective negative prompts

Effective negative prompts are short, specific and diagnostic. The best practice is to generate first with an empty negative field, observe the actual defects, and then add only the terms that address them.

Observed problemNegative prompt approachReason
Unwanted text in imageAdd text, letters, watermarkTargets a specific recurring artifact
Image looks washed outRemove most negative termsLong lists flatten contrast and detail
Wrong art styleName the competing styleDirectly opposes the unwanted region
Distorted handsUse a model-specific negative embeddingSingle token outperforms long lists
Fast distilled modelRely on the positive promptMany distilled models ignore negatives
Decision guide for negative prompt content

In the Diffusers library, the negative_prompt argument of a pipeline accepts this text directly, and graphical tools such as ComfyUI route it to the negative conditioning input of the sampler.

Limitations and common misconceptions

Negative prompts are a probabilistic nudge, not a filter. They lower the likelihood of unwanted features but cannot guarantee their absence, so they must not be relied on as a safety control.

  • Guidance-distilled models, which run with a guidance scale near 1, often ignore negative prompts unless true guidance is re-enabled at extra cost.
  • Compute cost roughly doubles per step with true classifier-free guidance, because two predictions are required.
  • Copied boilerplate lists of dozens of terms frequently degrade images instead of improving them.
  • Conflicting terms that also appear in the positive prompt cancel each other and produce muddy results.
  • Model dependence means a negative prompt tuned for one checkpoint may behave differently on another.

A further misconception is that a negative prompt deletes a concept from the model. In reality, the model still knows the concept; the guidance arithmetic only shifts probability mass at sampling time, which is why a very high guidance scale can overshoot and introduce oversaturated colors or harsh artifacts of its own.

A non-technical view

Think of a negative prompt as a list of things to avoid handed to an artist alongside the main request. The main prompt says “paint a quiet harbor at sunset”; the negative prompt adds “no people, no text, nothing blurry”.

The image tool keeps checking its work against both lists while it paints. It leans toward the request and away from the warnings, but it is still guessing, so an unwanted detail can occasionally slip through. Short, precise warnings work far better than long ones.

A concrete example

A small online furniture shop uses an open diffusion model to create lifestyle backgrounds for product photos. The first test images of a living room keep showing stray lettering on walls, cartoonish lighting and distorted picture frames.

The designer adds a concise negative prompt, “text, watermark, cartoon, distorted frame, oversaturated”, at a guidance scale of 6 and 30 sampling steps. In a batch of 40 images, the share that needs retouching drops noticeably, and the team reserves manual editing for the rare frames where lettering still appears. A longer copied list of 60 terms was tested as well, and it produced duller, less detailed rooms, so the short version became the standard setting.