레이블이 negative prompts인 게시물을 표시합니다. 모든 게시물 표시
레이블이 negative prompts인 게시물을 표시합니다. 모든 게시물 표시

2025년 2월 24일 월요일

3-2 Build negative prompts(Stable Diffusion Practical Guide Table of Contents)

>>>The Role of Negative Prompts

In Section 3-1, I explained how to write a prompt, but AUTOMATIC1111 has an additional feature called negative prompt. While a prompt is composed based on the 'required elements' that you want to create, a negative prompt is composed based on the 'elements that should not be created'. For example, if you want to output a boy but keep getting a girl, add Prompt girl to the negative prompt to remove the girl element. The writing method is the same as the prompt.

>>>Learn how to use negative prompts

The words entered in the negative prompt are usually determined by referring to the generated image results. If features that are not relevant to the learning process are output with the prompt connected, it can effectively prevent the appearance of those features.

In addition, just as there was a quality prompt among the prompts, you can specify a prompt to display the quality in the negative prompt. For example, three phrases are often used: Prompt worst quality, low quality, normal quality.

Prompt

masterpiece, high quality, 1girl, witch, blue robe, hat, long black hair, sitting, smile, looking at viewer, full body, flower garden, blue sky, castle,fantasy, vivid color, noon, sunny,

Negative Prompt

worst quality, low quality, normal quality

It's a good idea to start with a small number of negative prompts, check the generated images, and modify them as needed.

>>>Use embedding

Including the negative prompts explained so far, there is a function in the WebUI that allows you to load a completed learning file that contains all the concepts you want to exclude in the image generation process by entering a keyword in the negative prompt. This is called embedding.

Embedding is a way to express words in numerical form so that machines can understand them in the natural language processing process. It refers to the process of inserting vectors that exist as many as words or words into low-dimensional vectors so that the correlation between words or sentences can be analyzed. In Stable Diffusion, embedding refers to a learning model file that uses a method called Textual Inversion, and it is stated that it is a narrow concept.

Embedding files, like models, are distributed on sites such as Hugging Face and Civitai, and can be downloaded and used. Depending on the purpose, there are embedding files that are suitable for each purpose, and for example, there are files specialized in accurately generating finger structures.

negativeXL

https://civitai.com/api/download/models/97691?type=Negative&format=Other

gsdf/CounterfeitXL at main

easynegative(SD 1.5 series)

gsdf/EasyNegative · Datasets at Hugging Face

If you are using Colab,

upload the downloaded file to

sd > stable-diffusion-webui > embeddings in Google Drive.

If you are in a local environment,

upload the downloaded file to

root{stable diffusion directory}\stable-diffusion-webui\embeddings

After restarting the WebUI, enter the emeddings you want to use for the negative prompt. Or, place the cursor in the blank space of the negative prompt, and in the Textual inversion tab, click to select the embeddings you want to use, and they will be added automatically.

>no embeddings

Recommended Posts

Love is taking responsibility till the end

  I created a campaign called "Don't Abandon Your Beloved Dog" with Stable Diffusion. I tried creating it several times, but i...