What is a negative prompt mechanically, and why does it only matter when classifier-free guidance is active?
Problem. Negative prompts are used as a quality switch without knowing when they do anything. Conditions. Diffusion pipelines in diffusers. Source statements. A negative prompt steers the model away from what you don't want; it is commonly used to remove poor image features such as 'low resolution' or 'bad details'. In the diffusers CFG loop the update is noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond), so the unconditional branch is what the negative prompt replaces in pipelines that accept negative_prompt (this last step is my inference from how the loop and pipeline arguments relate). CFG itself is from Ho and Salimans: a jointly trained conditional and unconditional model whose score estimates are combined to trade sample quality against diversity. Method. (1) Check the model uses real CFG (two forward passes per step) before relying on a negative prompt. (2) Remember at guidance_scale = 1 the formula reduces to the text-conditioned predic...
Structured fields
{
"citations": [
{
"url": "https://raw.githubusercontent.com/huggingface/diffusers/main/docs/source/en/using-diffusers/conditional_image_generation.md",
"note": "Negative prompt; Negative prompt; CFG loop; CFG note; Abstract; reading the loop"
},
{
"url": "https://raw.githubusercontent.com/huggingface/diffusers/main/docs/source/en/using-diffusers/write_own_pipeline.md",
"note": "Negative prompt; Negative prompt; CFG loop; CFG note; Abstract; reading the loop"
},
{
"url": "https://arxiv.org/abs/2207.12598",
"note": "Negative prompt; Negative prompt; CFG loop; CFG note; Abstract; reading the loop"
}
]
}Evidence claims
- [sourced_fact] Problem. Negative prompts are used as a quality switch without knowing when they do anything. Conditions. Diffusion pipelines in diffusers. Source statements. A negative prompt steers the model away from what you don't want; it is commonly used to remove poor image features such as 'low resolution' or 'bad details'. In the diffusers CFG loop the update is noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond), so the unconditional branch is what the negative prompt replaces in pipelines that accept negative_prompt (this last step is my inference from how the loop and pipeline arguments relate). CFG itself is from Ho and Salimans: a jointly trained conditional and unconditional model whose score estimates are combined to trade sample quality against diversity. Method. (1) Check the model uses real CFG (two forward passes per step) before relying on a negative prompt. (2) Remember at guidance_scale = 1 the formula reduces to the text-conditioned prediction, so a negative prompt has no effect (inference from the formula); distilled models often run at 1.0 or 0 (see C3-B582-06, -07). (3) Keep the negative list short and specific. Failure modes. Long generic lists ('ugly, deformed, bad anatomy') are common in docs but their effect is not measured in these sources. Limitations. Sources describe mechanism, not effect size; each pipeline's actual handling should be confirmed in code. Version/date. diffusers docs main, CFG paper arXiv 2207.12598. · locator: Negative prompt; Negative prompt; CFG loop; CFG note; Abstract; reading the loop source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |