Deep Tech Point
first stop in your tech adventure

Examples of Negative Prompts in Stable Diffusion

February 7, 2024 | AI

In the rapidly advancing field of artificial intelligence, particularly in the realm of image generation, Stable Diffusion (SD) stands out as a groundbreaking technology. This tool, powered by deep learning, enables the creation of highly detailed images from textual descriptions. While it opens vast possibilities for creativity, it also presents unique challenges, such as deformations when creating human beings or other objects. Negative prompts help us avoid these specifics in the generated images. Let’s take a look what a negative prompt is, what are the most common examples and cases of negative prompting usage.

What is a Negative Prompt?

A negative prompt is essentially an instruction given to an AI model that specifies what to avoid, what not to create in the generated content. Unlike positive prompts that guide the model towards a desired outcome, negative prompts ensure certain elements, themes, or characteristics are excluded from the final product. Therefore, this feature gives you additional control by defining what you don’t want to see in the generated image. Some people treat this feature as optional, but in the latest version of Stable Diffusion this feature became crucial when wanting to improve desired outputs.

Below you will find an example of a generated image, as well as settings in the SD. Our positive prompt was:

ninja on jet ski

and the negative prompt was:

bad anatomy, bad hands, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, worst face, three crus, extra crus, fused crus, worst feet, three feet, fused feet, fused thigh, three thigh, fused thigh, extra thigh, worst thigh, missing fingers, extra fingers, ugly fingers, long fingers, horn, extra eyes, huge eyes, 2girl, amputation, disconnected limbs, cartoon, cg, 3d, unreal, animate

For your convenience we’ve marked on the image where exactly you can enter your negative prompt, and here’s the result:

However, we would prefer the image without the forest in the background. So, we’ve added “trees, forest” to the negative prompt and generated another image, this time without the trees in the background. We kept the same seed value (unchecked a “Random” feature in Invoke in the “Advanced options” under Image section), which specifies the image more or less. As you can see the scene is similar, however not exactly the same – the position of the jet ski and ninja is slightly different. However, if you want the original image, you will need to use inpainting to remove the trees while keeping the exact scene in the first image intact.

Cases Where Negative Prompts Are Used

Negative prompts find their application across various scenarios in Stable Diffusion, each highlighting their importance in either ethical AI use or creative control:

  1. Content Filtering: To prevent the generation of inappropriate or offensive content, negative prompts can specify elements to exclude, ensuring outputs remain within acceptable moral and ethical boundaries. One such example of negative prompts for non-adult content could be “nsfw, nude, censored”
  2. Creative Precision: Artists and creators use negative prompts to refine their artwork, avoiding unwanted motifs or themes to achieve a particular artistic vision. In our case, we wanted a ninja on jet ski without the trees in the image background.
    We got lucky and the trees were removed without any bog hustle, but in case there were trees left in the background, we could emphasis the weight of request by adding emphasis to the prompt, be it a negative or positive prompt. The emphasis could be in the negative prompt, such as “trees:1.5”, which Stable Diffusion would understand as a keyword that is 50% more important compared to the other keywords in the prompts.
  3. Bias Reduction: In efforts to mitigate biases present in training data, negative prompts can guide the model away from stereotypical or prejudiced representations. In our case, it is evident person behind the ninja mask is Asian, which is a stereotype when discussing an image of ninja. Let’s put “Asian” in a negative prompt and see what the results bring.

    Well, putting sunglasses on a ninja was a smart move 🙂
    Another option would be to update a positive prompt, for example:

    “Caucasian ninja on jet ski”

Negative Stable Diffusion prompts for different scenarios

Below you will find a few examples of commonly used negative prompts for different scenarios. Some of the keywords, such as blurry, low quality etc. are very general and can be applied in every situation, while other keywords in negative prompts can be much more specific as they describe very specific settings and features presented on a Stable Diffusion generated image.

Examples of most common used basic negative prompts

“worst quality, normal quality, low quality, low res, blurry, text, watermark, logo, banner, extra digits, cropped, jpeg artifacts, signature, username, error, sketch, duplicate, ugly, monochrome, horror, geometry, mutation, disgusting”

“bad anatomy, bad proportions, blurry, cloned face, cropped, deformed, dehydrated, disfigured, duplicate, error, extra arms, extra fingers, extra legs, extra limbs, fused fingers, gross proportions, jpeg artifacts, long neck, low quality, lowres, malformed limbs, missing arms, missing legs, morbid, mutated hands, mutation, mutilated, out of frame, poorly drawn face, poorly drawn hands, signature, text, too many fingers, ugly, username, watermark, worst quality”

“badly Rendered face, badly drawn face, poor facial details, badly drawn hands, badly drawn fingers, badly rendered hands, low resolution, bad composition, mutated body parts, blurry image, disfigured, oversaturated, bad anatomy, deformed body features”

Negative prompts for an animated character

“bad anatomy, bad hands, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, worst face, three crus, extra crus, fused crus, worst feet, three feet, fused feet, fused thigh, three thigh, fused thigh, extra thigh, worst thigh, missing fingers, extra fingers, ugly fingers, long fingers, horn, realistic photo, extra eyes, huge eyes, 2girl, amputation, disconnected limbs”

Negative prompts for realistic character

“bad anatomy, bad hands, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, worst face, three crus, extra crus, fused crus, worst feet, three feet, fused feet, fused thigh, three thigh, fused thigh, extra thigh, worst thigh, missing fingers, extra fingers, ugly fingers, long fingers, horn, extra eyes, huge eyes, 2girl, amputation, disconnected limbs, cartoon, cg, 3d, unreal, animate

Or also in negative: “internal-organs-outside-the-body, internal-organs-visible, anatomy-description, unprompted-nsfw, worst-human-external-anatomy, worst-human-hands-anatomy, worst-human-fingers-anatomy, worst-detailed-eyes, worst-detailed-fingers, worst-human-feet-anatomy, worst-human-toes-anatomy, worst-detailed-feet, worst-detailed-toes, camera, smartphone, worst-facial-details, ugly-detailed-fingers, ugly-detailed-toes,fingers-in-worst-possible-shape, worst-detailed-eyes, undetailed-eyes, undetailed-fingers, undetailed-toes”

Badly shaped anatomy is often a problem and one way to avoid it is to reinforce that command through a positive prompt, too. You could do that by insert “masterpiece-anatomy-perfect” or something along these lines in a positive prompt when you want Stable Diffusion to generate perfect hands and anatomy in general.

Negative prompts for non-adult content

When crafting prompts for generating images with content restrictions, especially for non-adult or family-friendly content, it’s crucial to clearly specify the exclusion of any elements that are inappropriate or not suitable for all audiences. Using negative prompts effectively communicates to the AI the boundaries within which it should operate. One simple example would be:

“nsfw, nude, censored”

And here’s an example of how you might structure such a prompt to ensure the content remains non-adult and appropriate for general audiences. Positive prompt could be:

“Create an engaging and vibrant image suitable for a children’s book illustration. The scene should be imaginative, colorful, and filled with whimsy, featuring friendly animals in a magical forest setting.

And negative prompt, for example:
“violence or any form of aggressive behavior, adult themes or suggestive content, frightening or scary elements that could unsettle a young audience, weapons, dangerous objects, or hazardous situations, alcohol, drugs, or any substance-related content, complex or disturbing emotional themes, stereotypes or any potentially offensive content, political or religious symbols or messages.”

Negative Prompts for Images of High Quality

When working to create images of high quality, these general prompts can be highly beneficial for all image types, regardless of whether you’re using negative prompts in Stable Diffusion or any other image generator:

“amputee, bad anatomy, bad illustration, bad proportions, blank background, blurry, body out of frame, boring background, branding, cropped, cut off, deformed, disfigured, dismembered, disproportioned, distorted, draft, duplicate, duplicated features, extra arms, extra fingers, extra hands, extra head, extra legs, extra limbs, fault, flaw, fused fingers, fused legs, grains, grainy, gross proportions, hazy, identifying mark, improper scale, incorrect physiology, incorrect ratio, indistinct, kitsch, logo, long neck, low quality, low resolution, macabre, malformed, mark, misshapen, missing arms, missing fingers, missing hands, missing legs, mistake, morbid, mutated hands, mutation, mutilated, off-screen, out of frame, outside the picture, pixelated, poorly drawn face, poorly drawn feet, poorly drawn hands, poorly drawn fingers, printed words, render, repellent, replicate, reproduce, revolting dimensions, script, shortened, sign, signature, split image, squint, text, tiling, trimmed, ugly, unfocused, unattractive, unnatural pose, unsightly, watermark, written language”

What to think about when writing Stable Diffusion negative prompts for landscapes and city views?

When generating images of landscapes, natural beauty, or scenic views in Stable Diffusion, using negative prompts can help you avoid unwanted elements and focus on the purity and aesthetics of nature. Here are some keywords and phrases that can be used as negative prompts to refine your image generation towards more natural and scenic views:

-buildings or -urban: Excludes man-made structures or urban elements, keeping the focus on natural landscapes.
-people or -crowds: Removes humans from the scene to emphasize solitude and untouched nature.
-vehicles: Ensures there are no cars, bikes, or other modes of transportation that could detract from the natural beauty.
-power lines or -electricity poles: Keeps the view free from these modern intrusions, maintaining the natural wilderness.
-trash or -litter: Ensures the landscape is pristine and untouched by pollution.
-signs: Avoids any man-made signs, keeping the focus on the natural environment.
-roads: Excludes pathways and roads to preserve the untouched look of the landscape.
-bright city lights: Useful for night landscapes, ensuring that urban light pollution doesn’t affect the natural starry sky.
-animals (if desired): In cases where you want to focus solely on the landscape without wildlife.
-cloudy or -overcast (if seeking clear skies): Specifies the weather condition to enhance the mood you’re aiming for.
-modern elements: Ensures that contemporary items or themes do not appear, maintaining a timeless natural scene.
Using these negative prompts allows you to guide Stable Diffusion in generating images that are more aligned with your vision of a natural, scenic view, free from any elements that could detract from the beauty of nature.

Of course, you can always add typical keywords and situations you want to avoid, such as blurry, boring, foggy, grainy, low contrast etc.

When generating images of cities, streets, buildings, and monuments on Stable Diffusion and aiming to control the output by excluding certain elements, using negative prompts can significantly refine your results. Here are some keywords and phrases that can be used as negative prompts to exclude specific elements or qualities from the generated images:

-crowded: Avoids the depiction of crowded places.
-modern architecture: Excludes buildings with modern architectural styles if you’re aiming for a historical or traditional look.
-ruins or -decay: Keeps the focus away from derelict buildings or monuments.
-night scene: Use if you prefer the scene to be set during the day.
-vehicles: Excludes cars, buses, and other vehicles to focus more on the architecture or streets themselves.
-people: Removes pedestrians and crowds from streets or landmarks.
-advertisements: Avoids modern billboards or neon signs that might distract from historical or aesthetic elements.
-construction sites: Excludes any ongoing construction work, scaffolding, or cranes.
-graffiti: Keeps walls and buildings free of graffiti or street art.
-street signs: Removes modern street signs or traffic lights for a cleaner look.
-wires and poles: Excludes telephone poles, wires, and other urban clutter.
-smog or -pollution: Ensures the sky and atmosphere look clear and unpolluted.
-trash or -litter: Keeps streets and surroundings clean and tidy.
-watermarks: Ensures the image does not include any unintentional watermarks or branding.
-foggy or -misty: Use if you want a clear view without atmospheric obscurations.
-under construction: Excludes buildings or monuments that appear unfinished.

Stable Diffusion negative prompts for generating portrait shots of people and pets

When generating portrait shots of people and pets on Stable Diffusion and aiming to maintain a specific focus or quality in the images, using negative prompts can help exclude unwanted elements or qualities. Here are several keywords that can be used as negative prompts to refine the output:

-crowded: To ensure the portrait focuses solely on the subject without unrelated figures or objects cluttering the background.
-distorted: To avoid unnatural proportions or features in the subjects.
-blurry: Ensures that the image remains sharp and details are well-defined.
-overexposed: Prevents the image from being too bright, losing detail in the highlights.
-underexposed: Avoids the image being too dark, losing detail in the shadows.
-busy background: Keeps the background simple and non-distracting, ensuring the focus remains on the subject.
-unnatural colors: Ensures the colors in the portrait appear natural and realistic.
-high contrast: Avoids harsh shadows or highlights that could detract from the subject’s features.
-low contrast: Prevents the image from appearing flat and ensures it has depth and dimension.
-artifacts: Avoids digital imperfections that could lower the image quality.
-noise/grain: Ensures the image is clean, without unnecessary texture that could detract from the portrait’s clarity.
-unrealistic: Keeps the portrayal of people and pets believable and within realistic bounds.
-abstract: Ensures the subjects are represented in a clear, recognizable manner, not abstractly.
-offensive content: Keeps the content appropriate and respectful to all viewers.
-unnecessary props: Focuses on the subject without the distraction of unrelated objects.

In addition to keywords, such as “absent limbs, additional limbs, amputee, asymmetric, asymmetric ears, asymmetric face, bad anatomy, bad ears, bad eyes, bad face, bad proportions, broken finger, broken hand, broken leg, dehydrated, disfigured, dismembered, disproportionate, double face, duplicated features…”

Negative prompts in Stable Diffusion when generating images of objects like furniture, appliances, and utensils

When generating images of inanimate objects like furniture, appliances, and utensils with Stable Diffusion and aiming to maintain clarity, focus, and aesthetic appeal, using negative prompts can help refine the output by excluding unwanted elements. Here’s a list of negative prompts that can be particularly useful for such tasks:

-cluttered: Ensures the object is the focal point without unnecessary items around it.
-distorted proportions: Keeps the object’s dimensions realistic and proportional.
-complex backgrounds: Maintains a simple or plain background to highlight the object.
-shadows: Avoids harsh or distracting shadows that could obscure details of the object.
-overexposed: Prevents the image from being too bright, which could wash out details.
-underexposed: Avoids making the image too dark, losing detail in the process.
-unnatural colors: Ensures the colors of the object are realistic and representative of the actual item.
-unrealistic textures: Keeps the textures appropriate and realistic for the material the object is made from.
-unnecessary reflections: Reduces glare or reflections that could distort the appearance of the object.
-blurry: Ensures all parts of the object are in sharp focus.
-abstract elements: Maintains a clear and recognizable depiction of the object, avoiding abstract interpretation.
-irrelevant details: Keeps the design and features of the object straightforward and relevant.
-human figures: Excludes people from the scene to keep the focus strictly on the inanimate object.
-brand names or logos: Avoids copyright issues by not including specific brands unless intended.
-distracting patterns: Ensures the surface or background doesn’t detract from the object itself.

You can also add keywords such as “absent parts, asymmetrical, broken design, cartoonish, distorted, faded, incomplete, incorrect, low quality, misshapen, missing, low resolution, misaligned, off focus, over-saturated color, overexposed, poorly rendered, replica, surreal, tilted, underexposed, unrealistic”

Example of a negative prompt keyword with emphasis

When specifying a negative prompt with an emphasis level in a system like Stable Diffusion, the format often involves a keyword followed by a colon and a numerical value that indicates the level of emphasis or importance to avoid that particular element. If you want to strongly discourage the inclusion of inequalities or any form of imbalance in the generated image, you might use a negative prompt like this:

inequalities:2

This prompt suggests that the image generation process should actively avoid creating or implying inequalities with twice the usual level of emphasis. This could be particularly relevant when generating images meant to depict harmony, equality, or uniformity, ensuring that the content does not inadvertently convey a sense of disparity or injustice.

In conclusion to the Negative Prompts in Stable Diffusion

The utilization of negative prompts in Stable Diffusion represents a significant advancement in the field of AI-driven image generation, offering users an unprecedented level of control over the content they create. By specifying what to avoid, creators can navigate around common pitfalls such as deformations, inappropriate content, and unwanted elements, ensuring that the final images align closely with their artistic vision and ethical standards. Whether it’s refining the anatomy in character art, filtering out non-adult content, enhancing the realism of portraits and objects, or ensuring the integrity of landscapes and cityscapes, negative prompts serve as a crucial tool in the digital artist’s toolkit. As AI technology continues to evolve, the ability to direct and correct the creative process with such precision will undoubtedly open new horizons for artists, designers, and content creators across various industries. Embracing these capabilities, users can push the boundaries of creativity while adhering to ethical guidelines and achieving a high degree of artistic fidelity in their work.

It’s essential to recognize that the strategic application of negative prompts in Stable Diffusion not only mitigates potential issues but also deepens the symbiotic relationship between human creativity and artificial intelligence. This nuanced control mechanism empowers users to fine-tune AI outputs, ensuring that the generated images are not just visually appealing but also culturally sensitive, ethically sound, and contextually appropriate. As we venture deeper into the realm of AI-assisted creation, the thoughtful integration of negative prompts exemplifies how technology can adapt to human values and artistic sensibilities, rather than merely serving as a tool for indiscriminate content generation.

Moreover, the evolution of negative prompting techniques signals a broader shift towards more interactive and intuitive AI systems. These systems are capable of understanding and executing complex artistic directions, thereby acting as co-creators in the artistic process. This development holds promise for a future where AI can contribute to a wide array of creative fields, from graphic design and digital art to advertising and media production, enhancing creative workflows and enabling new forms of expression.

In essence, the advancement of negative prompts in Stable Diffusion is a testament to the ongoing refinement of AI technologies, tailored to meet the diverse needs and ethical considerations of its users. By harnessing the full potential of negative prompts, we stand on the brink of a new era in digital creativity, where the collaborative potential between humans and AI can be fully realized to produce works that are not only imaginative and innovative but also respectful of the complexities of human culture and creativity.