File size: 7,339 Bytes
c41a1a5 5483d92 c41a1a5 5483d92 c41a1a5 83223b4 6a3d901 41df1ff 83223b4 dcc9ebc eed959c dcc9ebc 45b4580 2b2e5cf dcc9ebc 2b2e5cf f646984 2b2e5cf 22e458d a06b3c3 83223b4 32b7024 83223b4 0556494 83223b4 dcc9ebc cc08afa dcc9ebc 83223b4 04f5d18 cc08afa 6a3d901 a06b3c3 dcc9ebc d6cf9b6 dcc9ebc c0165d8 dcc9ebc d6cf9b6 dcc9ebc 0556494 dcc9ebc c0165d8 dcc9ebc d6cf9b6 dcc9ebc c0165d8 dcc9ebc d6cf9b6 dcc9ebc c0165d8 577cb26 04f5d18 dcc9ebc 83223b4 87b9b88 83223b4 04f5d18 83223b4 c0165d8 83223b4 dcc9ebc 83223b4 dcc9ebc 83223b4 f82c848 8fde562 927d798 83223b4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
---
title: Boring_Embeddings
tags:
- textual inversion embeddings
- image-generation
- stable diffusion
- AI Art
license: apache-2.0
---
# Boring Embeddings Quick Start
These Stable Diffusion embeddings capture what it means for an image to be uninteresting.
This is useful because it allows you to instruct your model NOT to produce images that look uninteresting.
If you're using the [Automatic1111 Stable Diffusion WebUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui),
just download one of the pt files into your stable-diffusion-webui\embeddings directory and use
the embedding's name in your NEGATIVE prompt for more interesting outputs.
<table>
<tr>
<td style="text-align: center;"><div style="text-align: center;"><img src="boring_folder.png" alt="Download a .pt file to stable-diffusion-webui\embeddings" style="max-height: 300px; display: inline-block;"></div></td>
<td style="text-align: center;"><div style="text-align: center;"><img src="boring_automatic1111_interface.png" alt="Type the embedding's name (without the .pt extension) in your negative prompt" style="max-height: 300px; display: inline-block;"></div></td>
</tr>
<tr>
<td style="text-align: center;"><strong style="font-size: larger;">Download a .pt file to stable-diffusion-webui\embeddings</strong></td>
<td style="text-align: center;"><strong style="font-size: larger;">Type the embedding's name (without the .pt extension) in your negative prompt</strong></td>
</tr>
</table>
<br>
<br>
## Model Description
The motivation for Boring embeddings is that negative embeddings like [Bad Prompt](https://huggingface.co/datasets/Nerfgun3/bad_prompt),
whose training is described [here](https://www.reddit.com/r/StableDiffusion/comments/yy2i5a/i_created_a_negative_embedding_textual_inversion/)
depend on manually curated lists of tags describing features people do not want their images to have, such as "deformed hands". Some problems with this approach are:
* Manually compiled lists will inevitably be incomplete.
* Models might not always understand the tags well due to a dearth of training images labeled with these tags.
* It can only capture named concepts. If there exist unnamed yet visually unappealing concepts that just make an image look wrong, but for reasons that cannot be succinctly explained, they will not be captured by a list of tags.
To address these problems, we employ textual inversion on a set of images automatically extracted from popular art sites
such as e621.net, derpibooru.org, and danbooru.donmai.us. Each of these sites is a rich resource of millions of
hand-labeled artworks which allow users to express their approval of an artwork by either up-voting it or marking it as a favorite.
The Boring embeddings were specifically trained on artworks automatically selected from these sites according to the criteria
that no user has ever favorited them, and they have 0 or only a very small number of up or down votes. The Boring embeddings
thus learned to produce uninteresting low-quality images, so when they are used in the negative prompt of a stable diffusion image generator,
the model avoids making mistakes that would make the generation more boring.
<br>
<br>
![Hamburger Comparison](hamburger_comparison.jpg)
<br>
<br>
## Versions
### **boring_e621**:
- **Description**: The first proof of concept of this idea. It is less refined than the other versions, but its less-intense effect might still be desirable.
- **Training Data Description**: A random selection of about 200 several-month-old images from e621.net having 0 favorites, fewer than 10(ish) up or down votes, and not having the tag "comic".
- **Model Trained On**: [YE18](https://huggingface.co/Doubleyobro/yiffy-e18).
- **Use Case**: Legacy. Maybe still useful on Stable Diffusion 1.4 or 1.5-based models if you want a less intense effect.
- **Trigger Word**: by boring_e621
<br>
### **boring_e621_v4**:
- **Description**: Extends the basic Boring embedding idea with several improvements including:
- Tweaks to how data was selected for inclusion.
- Initialized with text "by <average vector representation of 100 low-scoring e621 artist names>" (which means that you should not have to use the word "by" to trigger it anymore)
- **Training Data Description**: About 600 several-month-old images from e621.net having 0 favorites and a score of 0. (Comic pages are no longer excluded)
- **Model Trained On**: [YE18](https://huggingface.co/Doubleyobro/yiffy-e18).
- **Use Case**: The most general purpose embedding. Probably the best Boring embedding for most SD 1.4 or 1.5 based models.
- **Trigger Word**: boring_e621_v4
<br>
### **boring_e621_fluffyrock_v4**:
- **Description**: A version of boring_e621_v4 trained on a different popular model that understands e621 tags.
- **Training Data Description**: Identical training set to boring_e621_v4.
- **Model Trained On**: [Some early non v-pred version of Fluffyrock](https://huggingface.co/lodestones/furryrock-model-safetensors).
- **Use Case**: Best for models having Fluffyrock in their ancestry, but might not work well on versions with "v-pred" in the name.
- **Trigger Word**: boring_e621_fluffyrock_v4
<br>
### **boring_pony_v1**:
- **Description**: A proof of concept using a dataset collected from derpibooru.org and trained on a model that understands derpibooru tags.
- **Training Data Description**: About 200 several-month-old images from derpibooru.org having 0 favorites, a score of <= 0, and fewer than 5 total up or down votes.
- **Model Trained On**: [Pony Diffusion V4](https://huggingface.co/AstraliteHeart/pony-diffusion-v4)
- **Use Case**: None yet. It performs better on Pony Diffusion V4 than this model's in-built score-based negative-embedding-like tag (derpibooru_p_low), but less well than boring_e621_v4.
- **Trigger Word**: boring_pony_v1
<br>
### **boring_sdxl_v1**:
- **Description**: An sdxl embedding hacked together from just boring_e621_fluffyrock_v4 (the clip_l component), and the 0 vector (the clip_g component).
- **Training Data Description**: n/a
- **Model Trained On**: n/a
- **Use Case**: Works better on [Pony Diffusion V6](https://civitai.com/models/257749/pony-diffusion-v6-xl) than on the base sdxl model.
- **Trigger Word**: boring_sdxl_v1
<br>
<br>
# Bias, Risks, and Limitations
* Using these negative embeddings sacrifices some fidelity to the prompt in exchange for improved overall quality. For example, characters in the image may disappear or change eye/skin color.
* Using these negative embeddings may introduce unexpected or undesired content into the image to make it look less boring.
* Unlike other negative embeddings, the Boring embeddings are not intended to fix problems like extra limbs or deformed hands.
<br>
<br>
# Evaluation
To qualitatively illustrate how well the Boring embeddings have learned to improve image quality, we apply them to a small set of simple sample prompts using the base Stable Diffusion 1.5 model.
![Performance on Simple Prompts](comparison.jpg)
As we can see, putting these embeddings in the negative prompt yields a more delicious burger, a more vibrant and detailed landscape, a prettier pharoah, and a more 3-d-looking aquarium.
Hyperparameters were tuned based on manual evaluations of grids like these.
<br>
|