Tricks to Fix All Errors in Stable Diffusion Generation

 

fixing image generation in stable diffusion

When it comes to generating images using Stable diffusion, you have ever faced problems like ugly faces, deformed fingers, multiple fingers and legs, double heads, and whatnot.

So, we have listed all types of errors with solutions faced while generating images using Stable Diffusion. Let's fix all these types of problems in image generations.

Always get portrait style

A beginner who is new to prompting for generating images doesn't know how these models and prompts work are often wants a full body image and they try to use simple prompts like - "generate an image of a beautiful girl". 
So, in this case, a model who is trained much in the portrait type of image prefers to generate a simple portrait image. 
So, for fixing this you need to use the model which has been trained much on full body types of data sets.

Hallucinating Image Modal 

Sometimes you notice that whenever you try to generate an image, the models try to hallucinate means technically it lacks the constraints that limit the required results simply means they generate incorrect data and insights and pretend to be the correct one.

So, the quick solution is if you are a technical person and doing training on large data sets it's recommended to improve its overall results with accuracy and consistency. 

Or if you are a non-technical person who just wanted to use a pre-trained model from the community like Hugging Face or CivitAI you need to take care of certain factors while downloading the model how much its popularity, stars earned, and how much others are using the model.


Double head Problem

Like you, we are also the stable diffusion fan and we know what problems we need to face if this model behaves unexpectedly.  So, whenever you want to generate some good quality images you have never faced images like this.

Whenever you are generating high-resolution images you will get these types of weird wrong images generated by Stable Diffusion models.

Here, after practicing and working for multiple hours on Stable Diffusion models, we came to a solution to fix it in no time. 

Sounds great.

Right?

Here, in this article, we are sharing some minor fixes and settings you need to do while generating good-quality images with effective prompts on Stable Diffusion Web UI.

But here, we are providing a prompt to generate a girl with a robotic body with a human face in a sci-fi character. So, we have to feed a prompt.

Solo close up portrait of sci-fi robotic girl, futuristic world, ultrarealistic


Steps to fix the double head problem:


1. First of all we have open Stable Diffusion WeB UI. If you haven't installed it yet then we have already made an easy steps guide on how to download and install Stable Diffusion with Automatic 1111 on PC. 



2. Now, go to the respective link of the Github repo and copy the repo link: 

  https://gist.github.com/kohya-ss/3f774da220df102548093a7abc8538ed


3. Then move back to your Stable Diffusion web UI and go to the “extension” tab.


4. Click “Install from url tab” which is the third tab in Web UI.


5. Now, just past the copied link into the first text box which has the label “URL for extensions git Repository.” As we have shown in the above image. 

6. Now click on the INSTALL button to install the respective code in the background.


7. After installing the code, we can also check to verify whether the code has been installed or not. So, for that, you can go to the INSTALL tab.  Here, you can in the above image that a newly added feature has been installed and shown in the list.

8. Finally, we have to click on APPLY AND RESTART UI to reboot and restart the model.


9. After restarting it, you will see a new function has been added to the Stable Diffusion Web UI that is named “Kohya Hires.fix” with some cool new advanced options.

Now we will use this function to generate the same image with the same prompts that we have previously used.


10. The only extra thing we will do is to click on “enable extension” to enable the new extension Kohya Hires.fix for getting the advantage of it and this is the result.

Now, Click on the Generate Button to generate the image.



Look at the result in the above image. Did you see the difference?

Cool… 

Now, we can see the model is generating the results with what we have expected without any problem.


Conclusion: 

Image generation using AI has created a revolution and brought new opportunities for new businesses. But whenever something new things happen in the industry, it also brings problems and errors. 

So, we experienced multiple errors and problems, and fixing this is a challenging thing that needs to be considered and learned.