[StableDiffusion]Use of embedding

この記事は約5分で読めます。
スポンサーリンク

Things I want to do

You will use this by adding an embedding to a locally running Stable Diffusion web UI.

Using embedding can improve the quality of the generated images.

This explanation might make it sound similar to VAE, but embedding has a greater impact on the generated image than VAE. VAE is like applying a filter to the generated image to improve its quality, while embedding is like generating a similar, high-quality image.

For more information on VAEs, please refer to the following article.

スポンサーリンク

Environment

stable-diffusion-webui-forge

(Other stable-diffusion-webui models can install embeddings in the same way.)

スポンサーリンク

Download VAE

This article will use veryBadImageNegative as an example.

download

veryBadImageNegative can be downloaded from the following page.

veryBadImageNegative - veryBadImageNegative_v1.3 | Stable Diffusion Embedding | Civitai
v1.3 veryBadImageNegative_v1.3使用了新的训练图集,在AOM3和 viewer-mix_v1.7 中使用时表现较好。 veryBadImageNegative_v1.3 uses a new training atlas and performs well when...
スポンサーリンク

embedding installation

Copy the downloaded file to the following folder.

インストールフォルダ\embeddings

Depending on how StableDiffusion is installed, the webui folder may not exist, and instead, it may be located in ‘installation folder\embeddings’.

スポンサーリンク

Image generation using embedding

Open the ‘Textual Inversion’ tab.

Select the input field for NegativePrompt.I will.

Click on verybadimagenegative_v1.3 in the ‘Textual Inversion’ tab.

If a string appears in NegativePrompt, then you’re ready.

After that, you can generate the image by entering the Prompt/NegativePrompt as usual and clicking ‘Generate’.

Other input methods

The string to be entered into NegativePrompt (verybadimagenegative_v1.3) can be entered directly or using a template, as long as you know what string to input.

スポンサーリンク

結果

I was able to add and use embedding in the Stable Diffusion web UI.

Here are some examples.

As stated in the section on what I want to do, unlike VAE, using embedding creates a different image while preserving the overall image.

No embedding

Embedded

bonus

The correct way to use it is to put the specified string into NegativePrompt, but it will also work if you put it into Prompt.

When you put it into the prompt, it generates strange, distorted images.

If it doesn’t work as expected, please check if you’re entering the information in the correct location.

スポンサーリンク

otherembedding

This section introduces download pages for embeddings other than verybadimagenegative_v1.3.

EasyNegative

gsdf/EasyNegative at main
We’re on a journey to advance and democratize artificial intelligence through open source and open science.

bad-hands-5

fingers

yesyeahvh/bad-hands-5 at main
We’re on a journey to advance and democratize artificial intelligence through open source and open science.

コメント

タイトルとURLをコピーしました