Is your Stable Diffusion running slow? In this blog post, I will walk you through some simple tricks that can significantly increase the speed of your renders. By making a specific configuration change and applying some tricks you can optimize the stable diffusion process and achieve faster rendering times on your Nvidia graphics card.
The first step in enhancing the rendering speed is to edit your "webui-user.bat" file. This file is located in the root stable diffusion directory:
To edit settings, right-click on the file webui-user.bat and select Edit. (You may need to select “Show More Options” first if you use Windows 11). Now edit the file by:
The edited file should be looking something like this:
Now double click on the "webui-user.bat" file to restart Stable Diffusion. If this is your first time applying the fix, you will see a message indicating that xformers is being installed. Once the installation is complete, the message "launching web UI with arguments xformers" will appear, indicating that the optimization has been successfully applied.
Once you have successfully applied these settings, you will notice a significant increase in rendering speed when generating images. However, that's not all! There are still several other tips to further enhance the rendering speed in stable diffusion. Keep reading to discover more.
By increasing the Batch Size (to around 4), you can achieve a noticeable speed boost. Utilizing a batch size of 4-6 will result in VRAM dumping between each image generation, thereby enhancing the rendering speed.
However, it's important to note that for larger batch sizes, the performance benefit tends to plateau.
Another valuable tip to enhance rendering speed is to disable the "Live Preview Mode" when generating images. You could additionally set the "Live preview display period" to -1. This will make sure that the images are only shown after completion of the batch. To change these settings do the following:
The settings should be looking like this:
Did you know that when using these rendering speed tips, the images of sports cars are generated so quickly that it's almost like they're breaking the sound barrier? Buckle up and prepare for some turbocharged renderings!
Example 1:
Example 2:
Exmaple 3:
Recently LCM LoRA Model hit the Stable Diffusion community. Fueled by the quest for swifter and more efficient image generation, LCMs bring about a revolution, allowing rapid, high-fidelity sampling with minimal steps on pre-trained LDMs. Dive in with us as we turbocharge your stable diffusion image creation for unparalleled speed and quality.
By implementing these simple fixes and tips, you can significantly accelerate your stable diffusion renders. The render speed improvement depends on your Nvidia graphics card, but regardless, activating the optimization is worth it. We encourage you to apply these tricks and settings and hope that you will have amazing results. Thanks for tuning in and happy rendering!
You should add the parameter "--xformers" to the "COMMANDLINE_ARGS" in the "webui-user.bat" file. This can be done by editing the file and appending the parameter to the existing settings.
Increasing the Batch Size to around 4 can result in a noticeable speed boost. Using a batch size of 4 will facilitate VRAM dumping between image generations, improving rendering speed. However, larger batch sizes might not provide as much of a performance benefit.