AI painting: Finger painting is not good? Stable Diffusion efficiently repairs hand problems. A beginner's tutorial

existAI PaintingHand problems have always been a troublesome problem. Deformed hands, missing fingers, extra fingers and other problems often confuse us. This article mainly discusses the following issues:Stable DiffusionWhat methods can be used to repair hand problems.

1. Material preparation

Generate a picture with hand problems in the Wenshengtu function interface.

  • Large model: majicMIX realistic majicMIX realistic_v7
  • Positive prompt words

Prompt: a super beautiful chinese girl showing two hands,Open palms in a welcome sign,smiling,wearing pink dress,standing in the street,front view,upper body

Prompt words: A super pretty Chinese girl stretches out her hands, opens her palms in a welcoming gesture, smiles, wears pink clothes, stands on the street, front view, upper body,

  • Sampler: DPM++ 2M Karras
  • Sampling iteration number: 25
  • Image width and height: 512*768
  • CFG: 7

Randomly pick a picture with a finger problem

AI painting: Finger painting is not good? Stable Diffusion efficiently repairs hand problems. A beginner's tutorial

There are problems with both hands in the image generated above. The hand repair in this image will be used as an example in the following.

2. Method 1: Use the image to partially redraw the image to fix the hand problem

[Step 1]: Local redrawing settings for raw images

In the menu interface of the partial redrawing function of the original image, upload the photo of the hand to be repaired.

AI painting: Finger painting is not good? Stable Diffusion efficiently repairs hand problems. A beginner's tutorial

Since both hands have problems, in order to obtain the best repair effect, it is best to repair them in two steps, first repair the left hand, then repair the right hand. We first use the brush on the right side of the picture above to paint the left hand area white.

Below are the relevant parameter settings for partial redrawing of the raw image

AI painting: Finger painting is not good? Stable Diffusion efficiently repairs hand problems. A beginner's tutorial
  • Mask Mode: Redraw the mask content, specifically for hand issues.
  • Mask area content processing: original
  • Redraw area: the entire image
  • Sampler: DPM++ 2M Karras
  • Sampling iteration number: 25
  • Image width and height: 512*768
  • CFG: 7
  • Redraw Strength: 0.7

[Step 2]: Large model and positive prompt words

Large model: majicMIX realistic majicMIX realistic_v7

Positive prompt words: Keep the same as the positive prompt words used to generate the image.

【Step 3】 Image generation

Since the generated images are random, the generated images may not meet our requirements immediately. It is recommended to generate them multiple times until a satisfactory image is extracted.

AI painting: Finger painting is not good? Stable Diffusion efficiently repairs hand problems. A beginner's tutorial

【Step 4】 Repeat the above steps to repair the right hand

AI painting: Finger painting is not good? Stable Diffusion efficiently repairs hand problems. A beginner's tutorial

Related Notes:

(1) There is a random probability in the hands repaired in this way, and you may need to draw lots repeatedly to get a satisfactory one.

(2) Whether the restored hand looks good or not is related to the rendering capability of the model.

Method 2: Fix the hand problem using ControlNet’s DWPose

[Step 1]: Local redrawing settings for raw images

In the menu interface of the partial redrawing function of the original image, upload the photo of the hand to be repaired.

AI painting: Finger painting is not good? Stable Diffusion efficiently repairs hand problems. A beginner's tutorial

We will use the brush to paint both problematic hands white.

The settings of the large model, prompt words, and related parameters are the same as in method 1, so I will not repeat them here.

[Step 2]: ControlNet Openpose model settings

AI painting: Finger painting is not good? Stable Diffusion efficiently repairs hand problems. A beginner's tutorial

The relevant parameter settings are as follows:

  • Control Type: Select "OpenPose"
  • Preprocessor: dw_openpose_full
  • Model: control_v11p_sd15_openpose

As for the preview image of dw_openpose_full hand recognition, it can be seen that the face, hands, posture, etc. of the person are monitored very comprehensively.

AI painting: Finger painting is not good? Stable Diffusion efficiently repairs hand problems. A beginner's tutorial

For an introduction to dw_openpose_full, please refer to the previous article, which contains a very detailed explanation. [Stable Diffusion [Advanced]: How to implement hand repair (3)]

[Step 3]: Image generation

AI painting: Finger painting is not good? Stable Diffusion efficiently repairs hand problems. A beginner's tutorial

Related Notes:

(1) The hand operation repaired in this way is easy and controllable. In addition, the current DWPose controller seems to be able to automatically identify the problematic hand and display the generated preview image normally without the need for further editing.

(2) The length and joints of the generated fingers may still be inaccurate.

3. Method 3: Fix hand problems using ControlNet’s HandRefiner

[Step 1]: Local redrawing settings for raw images

In the menu interface of the partial redrawing function of the original image, upload the photo of the hand to be repaired.

AI painting: Finger painting is not good? Stable Diffusion efficiently repairs hand problems. A beginner's tutorial

We will use the brush to paint both problematic hands white.

The settings of the large model, prompt words, and related parameters are the same as in method 1, so I will not repeat them here.

[Step 2]: ControlNet HandRefiner model settings

AI painting: Finger painting is not good? Stable Diffusion efficiently repairs hand problems. A beginner's tutorial

The relevant parameter settings are as follows:

  • Control Type: Select "Depth"
  • Preprocessor: depth_hand_refiner
  • Model: control_sd15_inpaint_depth_hand_fp16

The effect of using depth_hand_refiner to obtain the hand preview image is as follows.

AI painting: Finger painting is not good? Stable Diffusion efficiently repairs hand problems. A beginner's tutorial

[Step 3]: Image generation

AI painting: Finger painting is not good? Stable Diffusion efficiently repairs hand problems. A beginner's tutorial

Okay, that’s all for today’s sharing. I hope that what I shared today will be helpful to you.

The model is placed in the network disk, and those who are interested can take it!

https://pan.quark.cn/s/b3df771404e2

 

statement:The content is collected from various media platforms such as public websites. If the included content infringes on your rights, please contact us by email and we will deal with it as soon as possible.
Encyclopedia

ChatGPT covers the most comprehensive academic paper writing prompts. Use ChatGPT to improve academic paper writing efficiency

2024-6-12 11:00:57

TutorialEncyclopedia

AIGC drawing design tutorial: Use AI tools (Kimi+Jimeng) to quickly batch produce healing illustrations that are popular on Xiaohongshu

2024-6-13 10:03:05

Search