Negative Prompts In Stable Diffusion

The creation of strong prompts that will help the AI model learn to produce accurate and lifelike images is crucial when working with AI image generation.

Just keep in mind that Midjourney, Stable Diffusion, and other text-to-image and image to prompt AI generators may not all work the same and that this is only a general overview.

Because of this, not every piece of advice may be appropriate for the specific generative model you are using. Without further ado, let’s first comprehend how we may make effective prompts for text-to-image AI development.

What Exactly Are Prompts?

A machine learning algorithm is given a set of instructions called a prompt to help it create a specific outcome.

Any user can use a prompt to specify any desired information, in image generation models you can use prompts to specify color or subject, and the AI will use that data to produce an artwork.

For Example – Make a picture of a black dog riding a bike, for example, could work as our prompt.

A good prompt ought to contain a verb, an adjective, and an intriguing term. Write a minimum of 3 to 7 words: If the prompt has more than three words, the AI will understand the context.

There aren’t any hard and fast rules on how lengthy or how short a prompt should be.

However, it is important to note that a role of a negative prompt is way more important in order to avoid any irregularities such as duplication, or distortion with regard to color, object size, etc.

Let’s try to know more about the negative prompts in the next paragraph.

What Is A Negative Prompt In Stable Diffusion?

A negative prompt is a directive that tells the Stable Diffusion model to exclude specific elements from the final image.

In other words, Stable Diffusion can be used in a negative prompt to let the user specify what he doesn’t want to view without providing any additional input. In a similar way, you specify to the pizza maker what you don’t want in your pizza.

Specifying abstract terms like “blurry” and “pixelated” might be utilized to enhance the output of the image.

Although Stable Diffusion accepts input in the form of prompts in human language, it finds it challenging to comprehend negative terms like “no,” “not,” “except,” and “without.”

As an illustration, even though you give Stable Diffusion parameters like “Don’t add duplicates,” it may still produce copies even though you made a portrait. That is because it comprehends negative cues more effectively than people do.

In that situation, an alternative to reproducing the same prompt is to offer a derogatory prompt, such as “duplicate” or “poorly Rendered face.”

Using Negative Prompts Effectively in Stable Diffusion

Let’s get started using a negative prompt now that you are aware of what it is.

The syntax of negative prompts differs depending on the Stable Diffusion model’s several GUIs. It is crucial to understand prompt weighing before learning how to use negative prompts.

Prompt weighting is a technique supported by Stable Diffusion, a method that provides consumers precise control over their prompt. You can guide Stable Diffusion on where to pay maximum attention and where to pay less by using prompt weight.

Although you may already be familiar with the usage of negative prompts in stable diffusion, let’s go over a few more instances before giving you a complete list of negative prompts that you can use to remove specific things or enhance your photographs.

The documentation for stability.ai states that adding “| negative prompt>: -1.0” to the prompt in DreamStudio or Stable Diffusion will enable you to experiment with negative prompts.

Adding “| distorted, ugly: The mistake “-1.0, too many fingers: -1.0” is occasionally used as a workaround for the issue of making an excessive amount of fingers is an example of this.

Let’s use an illustration to try the negative prompts effects now.

Prompt

A man walking around her neighborhood, highlight hair, detailed eyes, sharp focus, young face, perfect symmetric face, pupil reflecting surroundings, realistic skin, soft healthy skin
Stable Diffusion Without negative Prompt
Without Negative Prompt

Adding Negative Prompt

ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, extra limbs, disfigured, deformed, body out of frame, bad anatomy, watermark, signature, cut off, low contrast, underexposed, overexposed, bad art, beginner, amateur, distorted face

 

Stable Diffusion With negative Prompt
With Negative Prompt           Source – stable-diffusion-art.com

 

The images come out pretty good with negative prompts. Adding the negative prompt ugly, deformed and disfigured may improve things in version 2.1 but in version 1.5 it is not workable as these words are not understood by this version.

Considerations Regarding Stable Diffusion Prompt Weighting

  • Without any specific weighting, words have a weight of 1.0 by default.
  • There must be more than zero in the total text weight. As a result, if you specified 0.6 for one word and 0.4 for another subjective word in your prompt, the stable diffusion will automatically fill the difference.

You can also use negative weights, as shown in the heading below.

Suggested Read:How To Install Stable Diffusion In Windows

DreamStudio Negative Prompts: How To Use Them

There wasn’t any specific option in DreamStudio for negative prompts like seed or CFG scale. However, DreamStudio started supporting negative prompts in the second week of December 2022.

To use negative prompts in DreamStudio, your prompt must have a negative integer (prompt weight). The negative weight must be inserted with a single colon (:), just like the weight.

The weights must typically fall between -2.0 and 2.0. But you can only use it up to a maximum of +10 or -10. The number one is equal to -100%. It ensures that a certain term will be completely removed.

Prompt:

Portrait of Captain America in red: -1 suit, 4k, high quality

The aforementioned prompt instructs Stable Diffusion to omit a red outfit from the final image.

How To Use Negative Prompts In Other Stable Diffusion GUIs

NMKD Stable Diffusion GUI, AUTOMATIC1111’s Stable Diffusion WebUI, and many other Stable Diffusion GUIs are free to use in besides DreamStudio. Some of them, like NMKD’s 1.7.X version, feature a dedicated column where you can conveniently list all negative prompts.

Stable Diffusion negative Prompt view
Stable Diffusion Negative prompt box in AUTOMATIC1111

If there isn’t a separate field, you can use prompt weight or square brackets [] to enclose the negative prompt.

Negative Prompt Example:

A bowl of fresh fruits [Mango] = A bowl of fresh fruits, no Kiwi

Try the prompt weighting technique if the prompting method described above doesn’t produce the outcomes you were hoping for.

A bowl of fresh fruits Mango:-1 or A bowl of fresh fruits Mango:-1 = A bowl of fresh fruits, no Mango

Stable Diffusion will be instructed to remove the fruit Mango when producing “A bowl of fresh fruits” if the negative number is used.

A List Of All Possible Negatives Prompts For Stable Diffusion

The full list of negative prompts available in Stable Diffusion is shown below if you wish to take out specific elements of the image that you don’t want to keep:

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

 

We hope that our explanation of the negative prompts parameter in stable diffusion helped you understand it and that you will put what you’ve learned to use to create even more stunning pieces of art.

The Bottom Line

At the moment, implementing negative prompts requires adhering to a few grammar requirements, such as colon, square braces, and prompt weighting. However, in the future, negative prompts like height, width, steps, seed, and CFG scale attributes might have their own field specifically for them in DreamStudio and other Stable Diffusion GUIs.

Watch The Video !!

FAQs

Can we use negative prompts in every version of Stable Diffusion

Yes, negative prompts can be used in every version of Stable Diffusion. With Stable Diffusion 2.0, you have an even greater ability to harness the potential of Negative Prompts

What is the limit of prompts keywords in Stable Diffusions?

The number of keywords or tokens you can include in your Prompt may vary depending on the version you are using. When using Stable Diffusion 2.0 there is a token limit of 77 tokens.

AI Prompts Guide Team
AI Prompts Guide Team

We're a team of AI enthusiasts and experts who love to push the boundaries of language models like Chat GPT, Stable Diffusion, etc. Our mission is to empower you with top-notch prompts and tutorials, making the power of AI accessible to all. With our high-quality resources, you'll unlock AI's true potential. Visit aipromptsguide.com to explore the possibilities and let your creativity soar.