Stable Diffusionで手の指を修正するプロンプト呪文やDepth Libraryの使い方について解説

9 Jul 202308:48

TLDRThe video script discusses methods to correct distorted fingers in generated images using AI. It introduces the use of depth library for detailed finger corrections, inpaint for localized fixes, and provides tips on crafting prompts and negative prompts to improve image quality. The script guides viewers through the process of using these tools, emphasizing the combination of depth library and inpaint for the best results, and encourages viewers to try these methods to enhance their AI-generated images.


  • 🖐️ The script discusses methods to fix distorted or broken fingers in generated images, which is a common issue when no tools are used during initial image generation.
  • 🛠️ The Depth Library is recommended as a tool to effectively correct the shape of fingers, resulting in cleaner and more natural-looking images.
  • 📝 When using Depth Library, it's important to use the same model for both the original image generation and the finger correction to maintain consistency.
  • 🎨 The script provides a step-by-step guide on how to use the Stable Diffusion web UI and extensions like inpainting and Depth Library for image correction.
  • 🖌️ Inpaint can be used to correct only the painted parts of an image, which is useful not just for fingers but also for other areas like eyes that may need fixing.
  • 🔄 The script suggests a combination of methods for the best results: using Depth Library first, followed by inpainting to mask and correct only the finger areas.
  • 👌 The video script includes examples of positive and negative prompts that can be added to improve the generation results, such as 'punch hands' or 'open hands'.
  • 📸 Before using inpainting, it's necessary to obtain information about the original image, such as prompts and negative prompts, and replicate them in the inpainting process.
  • 🔍 The script emphasizes checking the model and control settings when using extensions like Depth Library to ensure the best possible outcome.
  • 🎉 The video script concludes by encouraging viewers to try these methods to fix previously generated images with distorted fingers and to subscribe to the AI Generation channel for more content.
  • 💡 A key takeaway is the use of 'easy negative' in prompts, which, even when written as a negative prompt, can help improve the overall quality of the generated image.

Q & A

  • What is a common issue with generating hand images without using tools?

    -A common issue is that the shape of the hands often becomes distorted or the fingers may collapse, resulting in an unnatural appearance.

  • What is the recommended tool for fixing distorted hand fingers?

    -Depth Library is recommended for fixing distorted hand fingers as it allows for a clean and precise correction of the hand shape.

  • How can you enhance the overall quality of the generated images?

    -To enhance the overall quality, include prompts like 'masterpiece', 'best quality', and 'ultra-detail', and avoid negative prompts such as 'worst quality', 'low quality', and 'normal quality'.

  • What are some negative prompts to avoid when generating hand images?

    -Negative prompts to avoid include 'bad hands', 'missing fingers', 'over 6 fingers', 'split fingers', 'interlocked fingers', and 'easy negative'.

  • What is the first method introduced for fixing hand fingers?

    -The first method introduced is using the inpainting tool, which allows for the correction of specific areas by painting over them.

  • How do you use inpainting to fix the hand fingers in an image?

    -To use inpainting, upload the image you wish to correct, copy the original prompt and negative prompt information, and paint over the hand area with a brush. Then, use the inpainting function to generate a corrected image.

  • What is the process for using Depth Library to fix hand fingers?

    -To use Depth Library, first install controlnet and Depth Model. Then, upload the image, adjust the settings, and use the saved hand shape image from Depth Library to correct the fingers. Adjust the control weight and preprocessor settings for optimal results.

  • Why is Depth Library considered the best method for fixing hand fingers?

    -Depth Library is considered the best method because it allows for precise and natural-looking corrections of hand fingers without altering the overall style of the image.

  • How can you further refine the results after using Depth Library?

    -After using Depth Library, you can switch to the inpainting method to mask only the hand area and correct it without affecting the rest of the image.

  • What is the recommended workflow for fixing hand images?

    -The recommended workflow is to first use Depth Library for a thorough correction, then use inpainting to mask and refine the hand area for the best results.

  • How can you ensure the hand shape is corrected without altering the original artwork's style?

    -By using the inpainting method after Depth Library, you can focus on the hand area and ensure that the original style of the artwork remains intact while the hand shape is corrected.



🖐️ Fixing Distorted Hands in AI-Generated Images

This section discusses a common issue in AI-generated images where hands often appear distorted, leading to unsatisfactory results despite the overall image quality. The recommended solution is using a tool called 'depth library,' which can refine the shape of hands, making them appear more natural. The video explains how to use prompts, negative prompts, and the 'inpaint' function of the depth library to correct distorted hands. Specific prompts to enhance the overall quality and specific negative prompts to avoid common errors in hand representation are highlighted. The process involves using Stable Diffusion's web UI to access and utilize the 'inpaint' function, emphasizing the importance of model consistency and detailing step-by-step instructions to achieve the desired corrections.


🔄 Advanced Techniques for Hand Correction in AI Images

The continuation delves into more advanced techniques for correcting hand shapes in AI-generated images, utilizing the depth library alongside controlnet and depth models. The video outlines the preparatory steps, including installing necessary models and using the Stable Diffusion web UI for adjustments. It describes the process of selecting and adjusting a hand shape, saving the corrected hand part, and then applying this correction to the original image. The tutorial recommends a combination of depth library and inpainting for optimal results, allowing for precise corrections without compromising the original image's style. The summary concludes with encouragement to apply these techniques to enhance past images with distorted hands, offering a comprehensive guide to achieving better results with AI image generation.



💡Image Generation

Image generation refers to the process of creating visual content using AI algorithms. In the context of the video, it is the primary method for producing images, but it can sometimes result in distorted or broken fingers due to the complexity of the shapes. The video discusses ways to correct such issues, making it central to the video's theme of improving AI-generated images.

💡Depth Library

Depth Library is a tool or a set of algorithms used to enhance the quality of AI-generated images, particularly in correcting the shapes of hands and fingers. It is one of the recommended methods in the video for fixing distorted fingers, indicating its importance in refining image generation results.


Inpaint is a technique or tool used to modify specific parts of an image, such as filling in or correcting sections by painting over them. In the video, it is presented as a method to correct the fingers in AI-generated images by manually inpainting over the problematic areas, which is crucial for局部修正.

💡Prompts and Negative Prompts

Prompts and negative prompts are textual inputs provided to AI systems to guide the generation process. In the video, they are used to instruct the AI on how to generate or correct images, with the aim of improving the quality and accuracy of the hand shapes in the generated content.


ControlNet is a feature or tool mentioned in the video that works in conjunction with the Depth Library to refine the corrections applied to the image. It is used to adjust and fine-tune the shapes of the hands, ensuring a more natural and accurate representation.

💡Stable Diffusion Web UI

Stable Diffusion Web UI is a user interface for the AI model Stable Diffusion, which is used for generating images. In the video, it serves as the platform where users can upload their images, apply corrections using tools like Inpaint and Depth Library, and adjust settings to achieve the desired image quality.

💡Image Quality

Image quality refers to the clarity, detail, and overall visual appeal of an image. The video is focused on improving the image quality, especially in the depiction of hands and fingers, by correcting any distortions or inaccuracies that occur during the AI generation process.

💡Hand Shapes

Hand shapes are the specific configurations and appearances of hands in an image. The video's main theme revolves around correcting and refining hand shapes in AI-generated images, as they are often problematic and can detract from the overall quality of the visual content.

💡AI Art Generation

AI art generation is the process of creating artwork using artificial intelligence. The video is centered on this concept, as it discusses techniques and tools for improving the quality of AI-generated images, particularly in the context of hand shapes and overall visual appeal.

💡Image Correction

Image correction involves modifying an image to fix errors or improve its quality. In the video, this is a critical process that addresses issues with the AI-generated images, such as distorted or broken fingers, with the goal of achieving more realistic and aesthetically pleasing results.

💡Control Weight

Control weight is a parameter used in the context of the video to adjust the influence of the control net when correcting images. It is important for fine-tuning the corrections applied to the image, particularly the hand shapes, to achieve a balance between the original image's style and the desired correction.


The discussion introduces methods to correct distorted fingers in image generation, a common issue when fingers are not properly accounted for in the rendering process.

Depth library is recommended as a tool to fix the shape of distorted fingers, allowing for a cleaner and more accurate representation in the final image.

The video provides detailed prompts and negative prompts that can be used to enhance the quality of finger generation in images.

Inpainting is introduced as a technique to correct only the parts of the image that have been distorted, such as the fingers.

Instructions on how to use the Stable Diffusion web UI to access and utilize inpainting features for finger correction are provided.

The process of using inpainting involves uploading the image, selecting the model, and using a brush to indicate the areas that need correction.

Depth library requires the use of controlnet and specific models for its functions, and instructions on how to install and use these are given.

The video demonstrates how to use depth library by uploading a background image and adjusting the settings to fix the fingers.

Control weight is an important parameter when using depth library, with recommendations to set it between 1 to 1.1 for optimal results.

A comparison of the before and after images shows a noticeable improvement in the quality of the fingers after using depth library and inpaint.

The video suggests a combination of depth library and inpaint for the best results in correcting fingers without altering the overall art style of the image.

A summary of the three methods discussed for fixing fingers is provided, emphasizing the effectiveness of using depth library followed by inpaint.

The video encourages viewers to try these methods to improve past image generations where fingers were distorted or botched.

The content creator, AIジェネ, specializes in sharing information related to AI generation and invites viewers to subscribe for more content.

The video concludes with a thank you note for watching and an encouragement for viewers to try the methods discussed.