Stable Diffusion is an AI system that generates images from text prompts. It uses a deep learning model trained on millions of image-text pairs to understand the relationship between words and visual concepts.
Negative prompts allow you to specify things you explicitly don’t want to see in the generated image. They act as “guard rails” to steer the model away from unwanted outputs. Using negative prompts well is key to getting better quality and more consistent results from Stable Diffusion.
In this article, I’ll share my top tips and best practices for effective negative prompts in Stable Diffusion. Whether you’re just starting out or looking to take your prompts to the next level, you’ll find plenty of prompt engineering ideas here.
Why Negative Prompts Matter
Negative prompts help Stable Diffusion understand what you don’t want in addition to what you do want. Without negative prompts, the model has no way of knowing if something is undesirable – it simply generates images that match the text prompt, including potentially unwanted elements.
Negative prompts allow you to eliminate:
- Technically bad image quality issues like low resolution, JPEG artifacts, etc.
- Aesthetically displeasing elements like ugly, deformed figures
- Unwanted content like nudity, violence, trademarks, etc.
Carefully crafted negative prompts lead to images more closely matching your creative vision. They also make the AI model more robust by reducing outliers and strange outputs. Mastering negative prompts is key to prompt engineering.
Best Practices for Negative Prompts
Here are my top tips for effective negative prompts with Stable Diffusion:
Be Specific
Vague negative prompts like “bad quality” or “weird” rarely work. The model doesn’t have a strong understanding of these subjective concepts. Instead, use concrete descriptors like:
- lowres
- blurry
- extra fingers
- missing arms
Use Multiple Words
Using multiple synonyms and related words improves chances of blocking unwanted elements. For example:
- ugly, deformed, disfigured
- mutilated, gory, bloody
Adjust Weightings
You can control how strongly the model avoids certain concepts by adjusting the weighting after the colon:
disfigured:1.2, ugly:1.5
Higher numbers mean avoiding that concept is more important.
Iteratively Improve
Go through multiple generations, looking at what unwanted elements come up. Add those as new negative prompts, like:
- weird face proportions
- extra legs
Use Existing Lists
Leverage [community curated lists of negative prompts][6] as a starting point. Tweak them by removing prompts that limit creativity and adding your own custom prompts.
Negative Prompt Categories
Here are some common categories of negative prompts to eliminate issues with Stable Diffusion images:
Image Quality
Fix technically bad image quality:
low quality, lowres, blurry, pixelated, jpeg artifacts
Content
Block unwanted content like adult, violent, or copyrighted material:
nsfw, nude, porn, gore, mutilated, copyright, trademark
Aesthetics
Prevent unaesthetic elements that just look “off”:
ugly, deformed, disfigured, bad anatomy
Coherence
Maintain coherent figures without odd body part issues:
fused fingers, missing arms, extra legs
Example Negative Prompts
Here are some full negative prompt examples for different use cases:
Everyday Prompt
low quality, lowres, nsfw, nude, ugly, deformed
Portrait Prompt
ugly, deformed, disfigured, bad anatomy, missing arms, extra fingers
Landscape Prompt
low quality, blurry, pixelated, people, vehicles, modern, trademark
Experiment with these negative prompts as a starting point for your own images. Tweak them based on the outputs you see, and iterate to build a custom set of negative prompts tailored to your style.
Conclusion
Negative prompts are a powerful tool for controlling Stable Diffusion outputs. Used properly, they lead to higher quality, more aesthetically pleasing images that better match your creative vision.
Leverage community resources for initial negative prompt ideas. Then meticulously build your own set of negative prompts tailored to your specific needs. Pay attention to what unwanted elements sneak through, and continually expand your negative prompts.
With practice, you’ll be able to eliminate nearly all of the weird artifacts and undesirable outputs. This allows Stable Diffusion’s exceptional creative capabilities to shine through more consistently.
I hope these best practices help you on your journey mastering negative prompts! Let me know in the comments if you have any other tips for effective negative prompts.
Useful Resources
- [Stable Diffusion Documentation][1]
- [Community Negative Prompts List][6]
- Automatic1111 WebUI