Stable Diffusion Prompt Weighting

Prompt weighting allows you to control the emphasis that stable diffusion places on certain words or concepts when generating an image. By increasing the weight of keywords, you can make elements more prominent in the final image. Conversely, reducing weights causes those elements to have less emphasis.

Mastering prompt weighting takes experimentation, but can give you more control over your stable diffusion images. Below I’ll showcase some prompt weighting examples and techniques you can try.

Emphasizing Key Elements

One of the most common uses of prompt weighting is to emphasize key elements you want to highlight in the image. For example:

a photo of a cute puppy with fluffy++ fur playing in the grass

The ++ after fluffy increases the weight, telling stable diffusion to pay extra attention to making the fur fluffy.

You can use + and ++ to boost weight, with more + signs adding even more emphasis. To reduce weight, use - or -- instead.

Here’s another example emphasizing a background element:

an oil painting of a girl in a blue dress standing in a field of flowers++

Balancing Multiple Elements

When your prompt contains several elements, prompt weighting allows you to find the right balance between them.

For example, let’s say you want an image with both pizza and pasta, but the pizza should be the main focus. Your prompt could look like:

a delicious photo of pepperoni pizza++ and pasta- on a table

The ++ boosts the weight of pizza, while the - reduces the weight of pasta. This tells stable diffusion to put more attention on the pizza without eliminating the pasta entirely.

Consistent Faces

Getting a consistent face in stable diffusion images can be tricky. Prompt weighting provides a handy tool to increase your chances.

By emphasizing the description of the person, especially details like hair color and facial features, you make it more likely for stable diffusion to render the face accurately each time.

portrait painting of a woman with long red hair++, green eyes++, and freckles across her cheeks++

Stylistic Effects

Prompt weighting shines for adding stylistic flourishes and effects to an image. You can direct stable diffusion’s attention to elements like lighting, texture, or mood.

Some examples:

a majestic landscape photo of mountains at sunset with dramatic lighting++ and long shadows++

an impressionist oil painting of a vase of vibrant flowers++ with visible thick brush strokes++

an eerie foggy forest with depth of field++ and cinematic lighting++

Negative Prompts

Along with emphasizing what you want in an image, you can also reduce the weight of unwanted elements with negative prompts.

For example, adding ugly-- will make it less likely for stable diffusion to generate unattractive images. Other common negative prompts are blurry--, bad anatomy--, extra fingers--, etc.

Weighting Multiple Prompts

So far the examples have weighted keywords within a single prompt, but you can also create multiple prompts with different weights.

This advanced technique allows you to “paint” different parts of the image with separate prompts.

For example:

Prompt 1: a photo of a cute puppy with fluffy fur playing in the grass++ 

Prompt 2: blue sky--, trees--, lake--

Prompt 1 guides the generation of the puppy with increased weight. Prompt 2 reduces the weight of landscape elements so the focus stays on the puppy.

Helpful Prompt Weighting Tips

Here are some handy tips when working with prompt weighting:

  • Start low, like + or -, and increase if needed
  • Too much weighting can give odd results
  • For consistent elements like faces, weight identifying details higher
  • Use negative weighting to reduce unwanted parts
  • Multiple weighted prompts can “paint” sections of the image
  • Try different prompt weighting variations and compare results

It takes some experimentation to get the weighting right for your desired outcome. The examples above should give you ideas of how to use this versatile stable diffusion feature.

Now go try it out with some prompts of your own! See what you can create and share your best weighted prompt images.

Useful Stable Diffusion Websites

Here are some great sites related to stable diffusion prompting and image generation you might find helpful:

Let me know if you have any other questions!