Zubnet AI學習Wiki › Negative Prompt
Using AI

Negative Prompt

Negative Conditioning
和主 prompt 一起使用的、描述你在生成影像中不想要什麼的文字。Prompt:「美麗的風景。」Negative prompt:「模糊、低品質、文字、浮水印、人。」模型在生成時主動避開 negative prompt 中的概念。Negative prompt 主要用於 Stable Diffusion 和其他開源影像生成模型。

為什麼重要

Negative prompt 是提升影像生成品質最有效的工具之一。沒有它們,模型傾向於產生偽影(模糊區域、多餘手指、文字浮水印),因為這些東西在訓練資料裡頻繁出現。一個寫得好的 negative prompt 消除常見失敗模式,在不改正向 prompt 的前提下讓你對輸出有更多控制。

Deep Dive

Technically, negative prompts work through classifier-free guidance (CFG). During generation, the model computes two predictions: one conditioned on the positive prompt and one conditioned on the negative prompt. The final prediction moves toward the positive conditioning and away from the negative: final = negative + scale × (positive − negative). The guidance scale controls how strongly the model follows the prompts.

Common Negative Prompts

The community has developed standard negative prompts for common issues: "blurry, low quality, jpeg artifacts" (quality), "extra fingers, deformed hands, extra limbs" (anatomy), "text, watermark, signature, logo" (unwanted elements), "ugly, disfigured, bad proportions" (general quality). Many users have a default negative prompt they include with every generation. Custom negative prompts address domain-specific issues.

Not All Models Use Them

Negative prompts work with models that support classifier-free guidance (most Stable Diffusion variants, Flux). DALL-E 3 and Midjourney don't expose negative prompts as a user-facing feature — they handle quality issues through their prompt rewriting and internal quality mechanisms. The trend in newer models is to reduce the need for negative prompts by improving default quality, but they remain valuable for precise control in open models.

相關概念

← 所有術語
ESC