Stable Diffusion is a powerful AI image generation tool that allows users to create realistic images from text prompts. One important feature of Stable Diffusion is the ability to use negative prompts – text that tells the AI what NOT to include in the generated image.
Negative prompts are especially useful when generating portraits or images of faces, as they allow you to eliminate unwanted artifacts or flaws. In this article, I will provide some prompt engineering examples and tips for using negative prompts effectively when generating faces with Stable Diffusion.
Avoiding Facial Deformities and Flaws
Here are some common negative prompts to use when generating portraits in Stable Diffusion:
ugly
deformed
disfigured
mutated
poorly drawn face
bad anatomy
These prompts tell Stable Diffusion to avoid generating images with unpleasant or unrealistic faces. You can make them more specific, for example:
ugly nose
deformed eyes
missing facial features
Preventing Extra or Missing Facial Features
Some negative prompts that help eliminate extra or missing facial parts:
extra limbs
missing limbs
extra fingers
missing fingers
extra eyes
one eye
three eyes
Adjust the weighting (number after the colon) to emphasize these prompts more:
extra fingers:1.2
missing fingers:1.5
Removing Unwanted Objects and Textures
Here are some negative prompts to remove unwanted objects or textures from generated faces:
text
watermark
logo
pixels
jpeg artifacts
blurry
grainy
You can make these more specific, for example:
blurry eyes
blurry mouth
Fixing Weird Hair or Accessories
Some negative prompts to fix weird hair or accessories:
bad hair
ugly hair
messy hair
floating hair
disconnected hair
extra hair accessories
ugly hats
ugly jewelry
Conclusion
Using carefully crafted negative prompts is key to generating realistic and pleasing portraits with Stable Diffusion. Start with some of the examples provided here, and iterate by adding or removing prompts based on the resulting images. With some practice, you’ll be able to eliminate flaws and create beautiful AI-generated portraits.
Useful Resources
- Stable Diffusion Documentation on Negative Prompts
- Guide to Stable Diffusion Portrait Generation
- Prompt Engineering for Faces