|

How To Fix Hands In Stable Diffusion [3 Working Methods]

Do you ever face the issue of bad or morphed hands while generating images in Stable Diffusion? 

If your answer is yes, you’re not alone. A lot of Stable Diffusion users face this problem on a regular basis where hands are not generated properly. 

So, how do you fix it? Well, there are different methods to fix hands in Stable Diffusion. Some of them are pretty simple while others are not so much. 

In this guide, I’ll be covering some of the best ways to fix hands in Stable Diffusion. I’ve used these methods myself and no longer face issues of badly generated hands in Stable Diffusion. 

That being said, let’s get started. 

How To Fix Hands in Stable Diffusion 

Fixing hands in Stable Diffusion is not very complicated and can be done in a few different ways. 

There are tutorials out there that use complicated methods to fix hands but in my opinion, if you follow the methods shared below, you won’t have this issue for 9 out of 10 of your images. 

Use Negative Prompts

The first and most important way to fix hands is by using negative prompts. But what if you’re already using negative prompts? 

Well, that’s a good start but there are certain keywords that can help you prevent bad anatomy and fix hands in Stable Diffusion. 

Here are some words you should add in your negative prompt to prevent bad hands: 

  • Extra fingers
  • Bad hands 
  • Bad anatomy
  • Missing limbs
  • Poorly drawn hands
  • Deformed
  • Mutated
  • Too many fingers
  • Extra limbs
  • Mutant
  • Body horror

Using these words in your negative prompts can be very helpful in preventing hands that are deformed or poorly drawn. 

You can either use all these words in the prompt or use a combination of a few of these words. 

Besides this, there is a negative prompt shared by the user u/AdPrevious2308 on this Reddit thread that is very good in preventing poorly drawn hands. 

Here’s the negative prompt: 

The artwork avoids the pitfalls of bad art, such as ugly and deformed eyes and faces, poorly drawn, blurry, and disfigured bodies with extra limbs and close-ups that look weird. It also avoids other common issues such as watermarking, text errors, missing fingers or digits, cropping, poor quality, and JPEG artifacts. The artwork is free of signature or watermark and avoids framing issues. The hands are not deformed, the eyes are not disfigured, and there are no extra bodies or limbs. The artwork is not blurry, out of focus, or poorly drawn, and the proportions are not bad or deformed. There are no mutations, missing limbs, or floating or disconnected limbs. The hands and neck are not malformed, and there are no extra heads or out-of-frame elements. The artwork is not low-res or disgusting and is a well-drawn, highly detailed, and beautiful rendering.

This negative prompt describes all the bad anatomy you’d wish to avoid in your image in a very precise manner. 

Related: How To Change Clothes In Stable Diffusion

Use Embeddings

Using negative prompts to fix hands can sometimes be a hit-and-miss as it largely depends on the type of image you’re generating. 

Even if you’ve used a proper negative prompt, complex images can still end up generating poorly drawn or mutated hands. 

To fix this, you should try using Embeddings which are much better at fixing hands than a simple negative prompt. 

Embeddings or Textual Inversion models apply additional styling to your images in Stable Diffusion. Embeddings are trained on a specific style of images to achieve or prevent a particular result. 

There are plenty of embeddings for fixing bad hands in Stable Diffusion on Civitai


Negative Hands - Textual Inversion Model

Here are some Embeddings trained for fixing hands in Stable Diffusion: 

Download any one of these models and put it in your negative prompt. 

Apart from this, you can also download some general Embeddings that can help you fix other aspects of your image such as hands, eyes, legs, and more. 

Here are some of my favorites that you should definitely try out: 

Using Embeddings or Textual Inversion models can be very helpful in preventing not just poorly drawn hands but also bad body anatomy. 

Related: How To Fix Stable Diffusion Exit Code 9009

Use Img2Img Inpainting

If you’re still unable to fix hands in Stable Diffusion after using a negative prompt and embeddings, then you need to pull up the big gun. 

Yes, I’m talking about using inpainting to fix hands which is a tried and tested method by many users in the Stable Diffusion community. 

The concept is simple: 

You upload your generated image in the img2img inpainting tab and draw a mask on the poorly drawn hand. Then, you fix it by writing a prompt. 

Here’s an image I generated in Stable Diffusion that has poorly drawn hands. 

Fix Hands in Stable Diffusion - Original Image
Original Image

Now, click on the Send to Inpaint button in Automatic1111 which will send this generated image to the inpainting section of img2img. 

Fix Hands in Stable Diffusion - Send To Inpaint

Here, draw over the hands to create a mask. Make sure the entire hand is covered with the mask. 

Fix Hands in Stable Diffusion - Mask Hands

Write a positive and negative prompt to fix hands. Here are the prompts I’ve used: 

Positive Prompt: 

highly detailed hands, holding cup of coffee 

Negative Hands: 

extra fingers

As you’ll notice, I didn’t write very long prompts here. That’s because we’re making a very small change to our image and a long prompt will not get us the desired result in our case. 

In the Inpaint generation settings, make sure you’ve selected the following settings: 

  • Mask Mode: Inpaint Masked
  • Masked Content: Original
  • Inpaint Area: Only Masked

You can leave the rest settings as is if you want. 

Also, many people have a misconception that for inpainting, you should only use inpainting models. 

That’s not necessary and for our example, I’ll be using the same model (Chillout Mix) that I used to generate this image. 

Here are the results after inpainting: 

As you can see, the hands have improved quite a lot but they’re still not perfect. 

So, I’ve customized the positive prompt by adding “highly detailed fingers” and also using a few embeddings I mentioned above in this guide: 

Fix Hands in Stable Diffusion - Final Inpaint Prompt

Take a look at the result now: 

The hands look absolutely perfect and when you compare it to the original, the difference is night and day. 

That’s how powerful inpainting is for fixing hands in Stable Diffusion. The best part is you can do a batch run to generate multiple images in inpainting and choose the one that has the best hands. 

Either way, if none of the above methods work to fix hands in Stable Diffusion, using inpainting is one of the best and fastest methods you can try. 

Related: How To Fix Eyes In Stable Diffusion

Conclusion

Fixing hands in Stable Diffusion isn’t as complicated as it seems. From this guide, I hope you learned the different ways to fix hands in your images generated in Stable Diffusion. 

I usually use proper negative prompts with embeddings and don’t face issues with poorly drawn hands most of the time. 

But in rare cases where the hands come out bad no matter what, I turn to inpainting which is quicker and faster than any other method out there. 

You can also fix poorly drawn hands in Photoshop but then again, it’s more complicated and a slow process than just using inpainting. 

If you have any questions regarding the methods shared in this guide, feel free to drop your questions below.

Stable Diffusion Prompt Organizer

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.