– Enhancing AI Image Quality: Top Tips and Tricks – Troubleshooting AI Image Issues: Common Problems and Solutions

Two heads? Extra fingers? Here’s a guide to fix these common problems.

Stable Diffusion Software

We will use this Stable Diffusion GUI for this tutorial. See my quick start guide for setting up in Google’s cloud server.

Two-head problems

two head problems in Stable Diffusion.

If you browse through AI image sites, it’s not unusual to see images with two heads connecting together in Stable Diffusion. It is usually caused by using portrait image size. Any image size deviate from 1:1 aspect ratio has the potential of synthesizing the dreaded two heads.

To avoid it, use image size with 1:1 aspect ratio, for example 512×512.

Three ways to tackle the two-head problem:

  1. Generate multiple images and discard those with two heads. (It’s not a bad idea but can cause you time and money.)
  2. Reduce aspect ratio. The closer to 1:1 ratio, the less likely you would encounter the infamous two-head.
  3. Generate a full-body image. (See next section for techniques.)

Not showing full body problems

Full-body portrait is highly sought after by AI artists. But it is also an area that Stable Diffusion can have most problem with.

A common suggestion to get a full-body image is to use the keyword “full body portrait”. But more often than not it just doesn’t work. Below are a few examples with “full body portrait” keyword added. You can see the keywords are completely ignored.

Positive prompt:

[Amber Heard: Ana de Armas :0.3],((Victorian)) , Feminine,((Perfect Face)), ((arms outstretched above head)), ((Aype Beven)), ((scott williams)) ((jim lee)),((Leinil Francis Yu)), ((Salva Espin)), ((oil painting)), ((Matteo Lolli)), ((Sophie Anderson)), ((Kris Anka)), (Intricate),(High Detail), (bokeh).

Negative prompt:

((((ugly)))), (((duplicate))), ((morbid)), ((mutilated)), [out of frame], extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), ((ugly)), blurry, ((bad anatomy)), (((bad proportions))), ((extra limbs)), cloned face, (((disfigured))), out of frame, ugly, extra limbs, (bad anatomy), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck)))

Describing the lower body

A more consistent approach is to add keywords of what you want to see in the picture. For example

  • standing
  • long dress
  • legs
  • shoes

Below are generated with adding keywords standing and long dress.

Adding “standing” and “long dress” to the positive prompt.

Now it is showing more of the body but we can do better.

Use portrait size

Previously I said don’t use portrait size. But there are exceptions. You do want to portrait size if you want to generate a full body image. Below are some examples of using portrait size in addition to using “standing” and “long dress” keywords.

Changing image to portrait size.

Garbled faces and eyes problems

It is fairly common to see distorted faces. In fact it happens to other body parts, just that our brain is particularly sensitive to any asymmetry in faces.

Face restoration

To fix faces and eyes, turn on face restoration if your GUI supports it. See my previous post for detail. If you are using a free site with no built-in support for face restoration, you use the following sites for post-processing.

Face restoration recovers eyes and facial details.

Use VAE

Do you know Stability AI released a patch to v1.4 and v1.5 models to fix eyes? They are called VAE. Check out this article for a guide to install and use.

Messed-up finger problems

It’s well-known in stable diffusion community that the AI has problem getting fingers right. It is not uncommon to see distorted, too many or too few fingers.

The first fix is to include keywords that describe hands and fingers like “beautiful hands” and “detailed fingers”. That tends to prime the AI to include hands with good details.

The second fix is to use inpainting. Create a mask in the problematic area. Use inpainting to generate multiple images and choose the one you like. I found it sufficient to reuse the same prompt as the original image.

Left: original image. Middle: inpainting mask. Right: inpainted image.

Summary

In this post, we have detailed the solutions to the problems of two heads, not showing full-body, garbled faces and fingers.

Check out this article for advanced prompt techniques.

Leave a Reply

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