So Artificial Sharing Artificial Intelligence AI news with the world

Bringing you the Latest AI News AND GUIDES

Struggling to run Stable Diffusion, can't quite fix certain errors? Follow our Guide. This guide was created to help Solve AUTOMATIC1111’s web UI errors, the most commonly used version of stable diffusion. This guide also gives tips on how you can improve overall performance Stressed out over errors? If you have been using stable diffusion without any issues, then you sure have been lucky! Stable diffusion is an amazing piece of Ai technology. It can create high quality AI generated art in a matter of minutes. If you can imagine it, stable diffusion can try it's best to create it. Did you know that millions of people use this software worldwide everyday, so of course some of us have issues, serious issues that cause stable diffusion to either break or not work correctly. Heck even us lot at so artificial have had our ups and downs with the technology. So if you have recently been playing around with stable diffusion and came across an error that has stopped you in your tracks, why not read our guide. We might just have the perfect solution on how we can fix stable diffusion for you. Stable Diffusion Errors and How To Fix Them Here is a list of common errors that stable diffusion likes to throw up and how you can fix them. Please note sometimes the main issues it your GPU and the fact it has too little VRAM. You can run stable diffusion locally with 4GB of VRAM but you are limited on the tasts you can perform. We recommend 8GB or more of vram especially if you want to create videos and outpainting. Majority of issues that you might get with stable diffusion can be easily fixed by editing the "webui-user.bat" file. You will need to add specific words to the "COMMANDLINE_ARGS=” section. If you want to edit this file you will need to go to your stable diffusion folder . You can find this file in the main directory, just right click and edit it with your chosen text editing software. We use notepad++. There are so many arguments you can use in this file, the list is so long we won't post it here. You can visit the automatic1111's github page for the full list, it is quite extensive. We will be using some of the command arguments on there to fix some errors. Please be aware stable diffusion tends to be a little unstable at times. It might be un your best interest that if a version of stable diffusion works for you 100% save it and don't update it. Always test new versions throughly before updating. We still use an old version of stable diffusion for certain tasks on one of our machines. The newer version just caused a lot of issues for it. Nans Exception This is actually quite a common error to come across when creating image with stable diffusion. Normally low end graphic cards experience this error quite often. You will see a message similar to the one below in your command line: In order to fix this error you will need to set the command line arguments in the webui bat file. Scroll to the bottom of this text file and add --diable-nan-check to the command line arguments as shown below: set COMMANDLINE_ARGS=--disable-nan-check Please note doing this can occasionally lead to you creating black images when creating your generations. This is quite common if you are using graphics cards with less than 8gb of ram. But there are work around this too. Black image Generations Black image on stable diffusion When creating images with stable diffusion, we have a view window that shows our generation process. Have you ever got to the end of that image generation and been served a plain black image? yeah, us too. It's no fun and frustrating considering sometimes it works and sometimes it doesn't. This commonly happens when you enter the command --disable-nan-check. Sure you can keep generating AI images in the hope you finally generate an image, but why would you want to waste your time doing that? Some people might recommend you to install xformers but that is a whole other headache. You can't just simply type "pip install xformers" it's a little bit more in depth. Believe us when we say you will still get "--xformers not found" when you install it via pip with certain systems. So we just tend to skip using it, oh and we do use NVIDIA GPU's! In reality you will want to add certain command line arguments. To stop the black screen appearing. Enter the following: set COMMANDLINE_ARGS=--lowvram --precision full --no-half If your command line argument says --disable-nan-check remove it. Just enter the above code instead and you should not have any issues with black images anymore. If you still do chances are your graphics cards is not compatible. Not Enough Memory Ah yes the dreaded not enough memory message. This can actually be caused by a wide range of issues. Only you know your system setup, what it can handle and what it can't. One main issue people tend to have when running stable diffusion is running out of VRAM. This can happen when you run other services on your computer at the same time. For example if I have photoshop open, a web browser that focuses more on GPU use (with over 20 tabs open) and I try to run stable diffusion, I might run out of VRAM. This is of course more common on systems with low amounts of VRAM. You can actaully run stable diffusion with 4GB of VRAM but it is recommended to have more than 8. If you are running out of memory try just running stable diffusion on it's own and see if you still get the message. If you do, there are other options for you. This becomes common when using advanced techniques like LoRA's, deforum and other tools stable diffusion has to offer. Reduce your Settings Sometimes the issues might be the vast amount of setting sand parameters you are using. Bigger images require more VRAM, same with batch producing images. Stick to generating one image at a time no bigger than 512 x 512. If you still get issues try 256 x 256. Edit the Command Line Arguments If you really do have low ram then it would be best to tell the command line arguments this. Here is a quick guide on what you should set them too: 4-6GB of VRAM - set COMMANDLINE_ARGS=--lowvram 8GB Of VRAM - set COMMANDLINE_ARGS=--medvram Over 8gb of VRAM - Should be fine to leave it empty. These options are designed to help you reduce the amount of memory used when generating images. Of course it results in slower image generations, but at least you get to generate those images. If you still have these problems add the following to the end of the arguments as a last resort: --precision full --no-half This should solve your low memory issues. If you are still experiencing these problems then we recommend you might want to invest in a new GPU. Make sure it's an NVidia one that's compatible with stable diffusion, that has over 8GB of VRAM if you want to use all of it's features. Speed Up Generations This image was created with stable diffusion If you feel your generations are running a little slow you can always edit the memory management. In the early days of stable diffusion doggetex was the only method of optimization, we have come a long way from there. If you want to optimize your image generation we suggest you go to the setting within your webui. First off start stable diffusion. Once it's full loaded click on the settings page. On the left hand side you should see a menu. Click on "optimizations" if you can't see this you have an older version of the web ui. Once you click on this option you are now greeted with a new window. This is the optimization section where it helps you choose which way your images are generated. The default is automatic. We set it to "sdp-no-mem - scaled dot product without memory efficient attention" it has greatly improved the speed as to which our images are generated. Please note this might not work for you, try playing around with these settings, see if you notice any difference. Be aware that you need to save the settings for it to take effect, if you don't it won't change anything. Conclusion This quick guide was created to help you fix any errors you might be having when it comes to running stable diffusion locally. We do hope we have managed to solve some headaches you might be having when using this AI generative tool. If you feel you are still having issues, then why not leave a comment below and we will see if we can help you with your issue.

How To Solve Stable Diffusion Errors

Struggling to run Stable Diffusion, can’t quite fix certain errors? Follow our Guide.

This guide was created to help Solve AUTOMATIC1111’s web UI errors, the most commonly used version of stable diffusion. This guide also gives tips on how you can improve overall performance

How To Solve Stable Diffusion Errors
Stressed out over errors?

If you have been using stable diffusion without any issues, then you sure have been lucky! Stable diffusion is an amazing piece of Ai technology. It can create high quality AI generated art in a matter of minutes. If you can imagine it, stable diffusion can try it’s best to create it.

Did you know that millions of people use this software worldwide everyday, so of course some of us have issues, serious issues that cause stable diffusion to either break or not work correctly. Heck even us lot at so artificial have had our ups and downs with the technology.

So if you have recently been playing around with stable diffusion and came across an error that has stopped you in your tracks, why not read our guide. We might just have the perfect solution on how we can fix stable diffusion for you.

Stable Diffusion Errors and How To Fix Them

Here is a list of common errors that stable diffusion likes to throw up and how you can fix them. Please note sometimes the main issues it your GPU and the fact it has too little VRAM. You can run stable diffusion locally with 4GB of VRAM but you are limited on the tasts you can perform. We recommend 8GB or more of vram especially if you want to create videos and outpainting.

Majority of issues that you might get with stable diffusion can be easily fixed by editing the “webui-user.bat” file. You will need to add specific words to the “COMMANDLINE_ARGS=” section.

If you want to edit this file you will need to go to your stable diffusion folder . You can find this file in the main directory, just right click and edit it with your chosen text editing software. We use notepad++.

An image showing how to edit the webui-user bat file

There are so many arguments you can use in this file, the list is so long we won’t post it here. You can visit the automatic1111’s github page for the full list, it is quite extensive. We will be using some of the command arguments on there to fix some errors.

Please be aware stable diffusion tends to be a little unstable at times. It might be un your best interest that if a version of stable diffusion works for you 100% save it and don’t update it. Always test new versions throughly before updating. We still use an old version of stable diffusion for certain tasks on one of our machines. The newer version just caused a lot of issues for it.

Nans Exception

This is actually quite a common error to come across when creating image with stable diffusion. Normally low end graphic cards experience this error quite often. You will see a message similar to the one below in your command line:

NansException Error on stable diffusion

In order to fix this error you will need to set the command line arguments in the webui bat file. Scroll to the bottom of this text file and add –diable-nan-check to the command line arguments as shown below:

set COMMANDLINE_ARGS=--disable-nan-check

Please note doing this can occasionally lead to you creating black images when creating your generations. This is quite common if you are using graphics cards with less than 8gb of ram. But there are work around this too.

Black image Generations

An example of the dreaded black image
Black image on stable diffusion

When creating images with stable diffusion, we have a view window that shows our generation process. Have you ever got to the end of that image generation and been served a plain black image? yeah, us too. It’s no fun and frustrating considering sometimes it works and sometimes it doesn’t.

This commonly happens when you enter the command --disable-nan-check. Sure you can keep generating AI images in the hope you finally generate an image, but why would you want to waste your time doing that?

Some people might recommend you to install xformers but that is a whole other headache. You can’t just simply type “pip install xformers” it’s a little bit more in depth. Believe us when we say you will still get “–xformers not found” when you install it via pip with certain systems. So we just tend to skip using it, oh and we do use NVIDIA GPU’s!

In reality you will want to add certain command line arguments. To stop the black screen appearing. Enter the following:

set COMMANDLINE_ARGS=--lowvram --precision full --no-half

If your command line argument says –disable-nan-check remove it. Just enter the above code instead and you should not have any issues with black images anymore. If you still do chances are your graphics cards is not compatible.

Not Enough Memory

Ah yes the dreaded not enough memory message. This can actually be caused by a wide range of issues. Only you know your system setup, what it can handle and what it can’t.

One main issue people tend to have when running stable diffusion is running out of VRAM. This can happen when you run other services on your computer at the same time. For example if I have photoshop open, a web browser that focuses more on GPU use (with over 20 tabs open) and I try to run stable diffusion, I might run out of VRAM.

This is of course more common on systems with low amounts of VRAM. You can actaully run stable diffusion with 4GB of VRAM but it is recommended to have more than 8. If you are running out of memory try just running stable diffusion on it’s own and see if you still get the message. If you do, there are other options for you. This becomes common when using advanced techniques like LoRA’s, deforum and other tools stable diffusion has to offer.

Reduce your Settings

Sometimes the issues might be the vast amount of setting sand parameters you are using. Bigger images require more VRAM, same with batch producing images. Stick to generating one image at a time no bigger than 512 x 512. If you still get issues try 256 x 256.

Edit the Command Line Arguments

If you really do have low ram then it would be best to tell the command line arguments this. Here is a quick guide on what you should set them too:

4-6GB of VRAM – set COMMANDLINE_ARGS=--lowvram

8GB Of VRAM – set COMMANDLINE_ARGS=--medvram

Over 8gb of VRAM – Should be fine to leave it empty.

These options are designed to help you reduce the amount of memory used when generating images. Of course it results in slower image generations, but at least you get to generate those images.

If you still have these problems add the following to the end of the arguments as a last resort: --precision full --no-half

This should solve your low memory issues. If you are still experiencing these problems then we recommend you might want to invest in a new GPU. Make sure it’s an NVidia one that’s compatible with stable diffusion, that has over 8GB of VRAM if you want to use all of it’s features.

Speed Up Generations

struggling to run stable diffusiion we can help
This image was created with stable diffusion

If you feel your generations are running a little slow you can always edit the memory management. In the early days of stable diffusion doggetex was the only method of optimization, we have come a long way from there.

If you want to optimize your image generation we suggest you go to the setting within your webui. First off start stable diffusion. Once it’s full loaded click on the settings page. On the left hand side you should see a menu. Click on “optimizations” if you can’t see this you have an older version of the web ui.

Once you click on this option you are now greeted with a new window. This is the optimization section where it helps you choose which way your images are generated. The default is automatic. We set it to “sdp-no-mem - scaled dot product without memory efficient attention” it has greatly improved the speed as to which our images are generated.

Please note this might not work for you, try playing around with these settings, see if you notice any difference. Be aware that you need to save the settings for it to take effect, if you don’t it won’t change anything.

Conclusion

This quick guide was created to help you fix any errors you might be having when it comes to running stable diffusion locally. We do hope we have managed to solve some headaches you might be having when using this AI generative tool.

If you feel you are still having issues, then why not leave a comment below and we will see if we can help you with your issue.


Support us

Leave a Reply

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