A concise tutorial on using stable diffusion

The controlNet module uses

Please add a picture description

  1. Enable选项启用,使用Openpose Edito中姿势生成需要将Openpose Editor指定为none状态。
    
  2. The above skeleton diagram is adjusted by Openpose Editor and then sent to txt2img here. To use the pose generation in Openpose Editor, you need to specify Openpose Editor as none state.

Preprocessor options:

Canny edge — 黑色背景上带有白色边缘的单色图像。 将图片变成线稿。

Depth/Shallow areas — 灰度图像,黑色代表深区域,白色代表浅区域。

Normal map — 法线贴图图像。

Semantic segmentation map——ADE20K 的分割图像。

HED edge — 黑色背景上带有白色软边缘的单色图像。

Scribbles — 黑色背景上带有白色轮廓的手绘单色涂鸦图像。

OpenPose (姿势关键点)— OpenPose 骨骼图像。

M-LSD — 仅由黑色背景上的白色直线组成的单色图像

Tutorial for using some options of Preprocessor

Official tutorial link: Control human pose in Stable Diffusion Stable Diffusion Art (stable-diffusion-art.com)
1. Canny image generation line draft
First load the corresponding module, and then click generate.
Please add a picture description

2. The hed outline generates an image, just like the above operation, you only need to change the corresponding Preprocessor option and model to hed, and you also need to add a description to generate it

Please add a picture description

3. Scribble graffiti generation
Please add a picture description

The style content generated by the above image push needs to obtain the content according to the underlying model. Replace the underlying model with
Please add a picture description

Image generated image img2img

Please add a picture description

If you are not satisfied with the part of the generated picture, you can redraw it locally, black out the place that needs to be modified, if you are not satisfied, send to inpaint and continue to modify it on the basis of a better modification until you are satisfied
Please add a picture description

Collaborative creation, according to your hand-drawing and prompt words, and then generate pictures to generate different content
Please add a picture description

skills

tag提示词:
线稿:((line art, white and black))
漫画风:((monochrome, screentone))

generative principle

  • General principle:
    Generally speaking, the higher the weight of the vocabulary, the higher the weight of the word, so in most cases the prompt word format is: quality word, medium word, subject, subject description, background, background description, artistic style and author
  • Weight adjustment: The most direct weight adjustment is to adjust the order of words. The higher the front, the greater the weight, and the lower the weight, you can use the following syntax to set the weight of keywords. Generally, the weight is set between 0.5 and 2. You can By selecting the vocabulary, press ctrl+↑↓ to quickly adjust the weight, each step is 0.1, (best quality:1.3)
  • Combination of entries:
    Combining several words in parentheses will not make AI treat them as one, even if they are weighted. For example, the following two are actually completely equivalent
    ○ (car, rockt, gun:1.3)
    ○ (car:1.3), (rocket:1.3), (gun:1.3) The
    combination of entries is similar to natural language, using prepositions, such as and, with, of, etc., such as (car with guns and rockets)

Sampling methods
There are many sampling methods, but there are basically only a few commonly used at present:

  • Euler a: The fastest sampling method, which requires very low sampling steps. At the same time, as the number of sampling steps increases, it will not increase the details. When the number of sampling steps increases to a certain number of steps, the composition will change suddenly, so don't use high steps. Use in a number of scenarios
  • DPM++2S a Karras and DPM++ SDE Karras: These two are not too different. It seems that SDE is better. In short, the main feature is that compared with Euler a, there will be more details at the same resolution. Tucked into the whole body, the price is slower sampling speed
  • DDIM: It is rarely used, but it can be used if you want to try a super high number of steps, and the details can be superimposed as the number of steps increases

Generally speaking, the number of sampling steps
only needs to be kept between 20 and 30 most of the time. A lower sampling deployment may cause the image to be incompletely calculated, and a higher number of sampling steps will not yield high details. There is only very weak evidence that high step counts can fix limb errors with a small probability, so use higher step counts only when you want to produce a map with exhaustive details

Output size
Refer to the approximate output size and content relationship:
• About 30w pixels, such as 512 512, mainly headshots and busts
• About 60w pixels, such as 768
768, mainly single body, standing or lying down
• More than 100w Pixels, such as 1024*1024, single or two or three full-body, mainly standing
• Higher resolution, group portrait, or direct screen collapse

Cue Word Correlation (CFG)
CFG is difficult to describe the specific function in words. Generally speaking, it is to add a coefficient to all your positive and negative cue words, so generally the lower the CFG, the more plain the picture , the details are relatively less, the higher the CFG, the more greasy the picture, and relatively more details • The
two-dimensional style CFG can be adjusted higher to obtain richer color and texture expression, generally at 7 12, you can also try 12 20
• Realistic The CFG of the style is mostly very low, generally between 4 and 7. Realistic models are very sensitive to CFG. If you adjust it a little more, the ancient gods may come. You can fine-tune it in steps of 0.5

Random Seed
• Click the sieve button to set the random seed to -1, which is random
• Click the Recycle button to set the random seed as the random seed of the picture you are viewing in the right picture bar

Face restoration
Face restoration is of certain value when the resolution of realistic pictures generated by early models is not high, and it can correct wrong realistic faces at low resolutions, but the facial accuracy of current models has far exceeded that of early models, and The Face Repair feature will change the look of your face, so just ignore it

VAE settings
The role of VAE is to correct the color of the final output image. If you do not load VAE, the image may appear particularly gray. Set the location: • After setting the VAE settings of the -StabelDiffusion-
model,
remember to click the save settings above, VAE is universal , which can be combined with any model

solution

fix hand pose


Tag prompt word website
https://aitag.top/
https://tags.novelai.dev/
https://www.wujieai.com/tag-generator

Teaching document
https://stable-diffusion-art.com/automatic1111

model library

Model download:
https://civitai.com/
https://huggingface.co/lora-library

Guess you like

Origin blog.csdn.net/weixin_56766616/article/details/129955500