Practical operation of stable diffusion-prompt words

Series Article Directory

stable diffusion practical operation

Practical operation of stable diffusion-prompt word-character attribute
stable diffusion practical operation-prompt word-character clothing
stable diffusion practical operation-prompt word-overall environment
stable diffusion practical operation-prompt word-picture structure
stable diffusion practical operation-CLIP



foreword

This article has a special section on prompt words.
SD prompt words are based on phrases and cannot be defined by sentences, but by words. For example, you want long and wide noodles and big For a round bowl, it can be directly decomposed into (face, length, width), (bowl, large, round).
The prompts are separated by English commas, and newlines can also be used, but it is best to add commas for newlines.

Prompt words are not written all at once, first have a prototype, and then gradually refine them.

Prompt words can be classified, such as the following (in fact, there are many more, you can see the text below):

The content of this section is mainly based on the video of station B. The original video link:
Connection entrance: 20 minutes to understand the prompt and parameter settings

Prompt word site:
  1. https://promptheroes.cn/
  2. https://prompthero.com/
  3. https://www.prompthunt.com/
  4. they are ready
  5. Unbounded AI

1. What is the prompt word?

1.1. The principle of prompt words

The prompt word cannot specify the image size, such as 8k, it cannot generate an 8k resolution image.
You can simply understand it as searching for keywords, helping you find the pictures in the SD library that best match your prompt words, and then imitating the drawing method of these pictures to draw a picture for you. The diagram below illustrates this in detail:

The prompt word 8K mentioned above is to find high-quality pictures in the SD library, and then imitate and draw the corresponding pictures.

1.2 CFG correlation (CFG Scale)

1.2.1 Definition of CFG

How much the image should obey the cue word

What is Guidance?

What is Scale?

The larger the value of CFG, the more detailed its description.

1.3 Difference between CFG and CLIP

Both can adjust the influence of prompt words on the content of the picture.
The main function of cfg is that you choose to let the SD original model get the picture as it is, or draw a rough shape, it’s up to you, and it’s up to you to decide how similar the drawing is. .

The main function of the clip is that you choose whether to let the SD see the gourd you gave clearly. In the end, it depends on the painter. The situation that the painter understands determines the final result.

1.4 The influence of different values ​​of CFG on the image

The setting of CFG is 1-30, with an interval of 0.5, which will affect the impact of each prompt word on the result. The higher the value, the more obvious the difference in the weight and sequence of prompt words. The following is the comparison generated by the xyz table.

1.5 CFG Setting Suggestions

Generally set between 5-15 (7, 9, 12), but it still depends on the model author.

Too high or too low CFG is not good

# Two, use steps

2.1 Core Principles of Prompt Words

  1. SD doesn’t understand all the words, some words are not in the lexicon, it is incomprehensible, so we need to use more words given in the webUI.
  2. The prompt words will pollute each other, the more prompt words the better, and subtraction should be done as much as possible.

2.2. Classification of prompt words

Prompts are divided into positive prompts and negative prompts .

2.2.1 Positive prompts

cue word you want to appear

 masterpiece, highres, 1girl,blush,(seductive smile:0.8),star-shaped pupils,china hanfu,hair ornament,
 necklace, jewelry,Beautiful face,upon_body, tyndall effect,photorealistic, dark studio, rim lighting, 
 two tone lighting,(high detailed skin:1.1), 8k uhd, dslr, soft lighting, high quality, volumetric lighting, 
 candid, Photograph,high resolution,best quality

2.2.2 Reverse prompts

If you don't want something to appear in the photo, you can use negative prompts to tell SD. For example, you don't want low-quality, extra fingers, ugly faces, etc. Most of the homework can be copied. But using embedding

模板1:
 (worst quality:2), (low quality:2), (normal quality:2), lowres, ((monochrome)), ((grayscale)),
  bad anatomy,DeepNegative, skin spots, acnes, skin blemishes,(fat:1.2),facing away, 
  looking away,tilted head, lowres,bad anatomy,bad hands, missing fingers,extra digit, 
  fewer digits,bad feet,poorly drawn hands,poorly drawn face,mutation,deformed,
  extra fingers,extra limbs,extra arms,extra legs,malformed limbs,fused fingers
  ,too many fingers,long neck,cross-eyed,mutated hands,polar lowres,
  bad body,bad proportions,gross proportions,missing arms,missing legs,extra digit,
   extra arms, extra leg, extra foot,teethcroppe,signature, watermark, username,
   blurry,cropped,jpeg artifacts,text,error

Template 2:

paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), 
cloth, underwear, bra, low-res, normal quality, ((monochrome)), ((grayscale)), 
skin spots, acne, skin blemishes, age spots, glans, bad nipples, long nipples, 
bad vagina, extra fingers,fewer fingers,strange fingers,bad hand, ng_deepnegative_v1_75t, 
bad-picture-chill-75v,Six fingers, deformed hands,

2.3. Prompt word writing template

The template is as follows: image quality + main body structure + main body details + picture structure

2.3.1 Image quality:

For example: the highest quality, ultra-high definition quality, masterpieces of masters, 8k quality, etc... The resulting photos will be more refined
Translated into English is: Highest quality, ultra-high definition, masterpieces, 8k quality,

2.3.2. Main structure

For example, full body, half-body shot, medium shot, Panorama shot (panorama), such as background, weather, photo pose, composition, etc. For example: on the street, sunshine,
upper body photos (street, Sunshine, upper body photos, )

2.3.3. Body Details

For example: a girl with very delicate facial features, very detailed eyes and mouth, long hair, curly hair, delicate skin, big eyes
translates into English as: 1girl, very delicate features, very detailed eyes and mouth, long hair, curly Hair, delicate skin, big eyes, the content of these photos can be changed at will, but words such as exquisite facial features, detailed eyes, white sweater, necklace, etc. can be added by everyone.

2.3.4. Image structure

For example, monochrome (monochrome), pixel art (pixel style), watercolor (watercolor)

2.4 How to write prompt words

2.4.1 Enclose keywords directly in parentheses:

(curly hair) In this way, the parenthesis once is 1.1 times the weight, and the parentheses twice ((curly hair)) is 1.1×1.1=1.21 times, and so on, we can increase the weight, then we can also reduce the weight. The weight reduction is to use "[ ]" Enclose the words, such as: [curly hair],

2.4.2 Write directly with values

(Keyword: value): (curly hair: 1.6), directly a curly hair is 1, if it is greater than 1, it will increase the weight, and if it is less than 1, it will decrease the weight.

Here is the summary

There are more usages of prompt words, such as:

2.5. Key points for writing prompt words

Don't write it in one sentence, use words and phrases, and use comma style.

2.5.1 Recommendations

2.5.2 Not recommended

2.5.3 Security Restrictions

(nsfw)-not safe for works
stuff that should not appear in the picture, to prevent character collapse, you know

2.6 Prompt word embedding

Embedding is generally used here:
Deep Negative
badhandv4

2.7. Prompt word tool and website

2.7.1. Collection of negative tag words

https://www.bilibili.com/read/cv19834742
https://y3if3fk7ce.feishu.cn/docx/VOZMdoib8oY7xVxVoYbcA8m1nld

2.7.2. How to write keywords

https://y3if3fk7ce.feishu.cn/docx/KqEMdhJigoFY8fxc9TPcwMninKf

2.7.3 Download keywords

https://zhuanlan.zhihu.com/p/573340345
template + vocabulary link: https://pan.baidu.com/s/1-akfkdIBYM340p2wtqWccA
extraction code: 0y8q

Three, prompt vocabulary

3.1 Picture structure-1

Link entry: stable diffusion practical operation-prompt word-picture structure

3.2 Overall environment 1

Link entry: stable diffusion practical operation-prompt words-overall environment

3.3 Character attributes

Link entry: stable diffusion practical operation-prompt words-character attributes

3.4 Character Costumes

Link entry: stable diffusion practice operation-prompt words-character clothing

Four. Summary

For example: the above is what we will talk about today. This article only briefly introduces the use of pandas, and pandas provides a large number of functions and methods that allow us to process data quickly and easily.

Guess you like

Origin blog.csdn.net/weixin_43360707/article/details/132626722