20 times faster for SDXL model with Stable Diffusion A1111-small trick You Want to Know

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hello, my friend Welcome to the TubeU channel First, I would like to express my gratitude to Mr. Enricii, who pointed out in his comment that I should use the "--medvram" command. Before, my webui-user.bat looked like this: "set COMMANDLINE_ARGS=--xformers --no-half-vae," and the image generation speed was as listed here. Now, after adding this magic word, it became: "set COMMANDLINE_ARGS=--xformers --medvram --no-half-vae." The generation speed increased dramatically, more than 20 times faster than before. Let's take a look at an example: I input a very simple prompt on positive and negative using Euler a and 1024x1024 resolution for testing. Three image generations took 1 minute and 15 seconds, while one picture took only 25 seconds. Compared with the former setting, it is 21 times faster, which is truly unbelievable. The image quality is excellent. If I change the model to an older one, such as Dreamshape v6 model, and use the same parameters, it will take 53 seconds. Each picture took only about 18 seconds. However, you can see that the generated images often have two girls because the training resolution is 512x512. So, I changed it to 512x512 and used the Hires fix function. Now, all pictures have only one girl, and each picture took about 20 seconds. This result aligns with the old experiment I have done before. Thus, the "--medvram" does not take effect for the old model, but it significantly increases the image generation speed for the SDXL 1.0 model. Also, it is essential to check if you are using the latest Automatic1111, v1.5.1. If not, you can update it by entering "git pull" in the command line, and it will automatically update your A1111. Additionally, if something goes wrong, deleting the venv folder, which is a virtual environment used by Python, might be the easiest solution as Python will automatically create a new one. I initially thought that my old RTX 2070 was no longer capable of running WebUI automatic1111 efficiently, but it turns out that my configuration was not correct. Now, I can put more effort into using A1111 with the SDXL model. I also checked the sampling method using the SDXL model. The best way to do this is by using the script function. In the "x" type, you can select the sampler, and in the "x" values, you can choose them one by one or add all of them by clicking the small icon. There are a total of 22 samplers, but DDIM, PLMS, and UniPC are not supported as these three are the SD model 1.5 built-in samplers. It seems that the core team may be developing new types of samplers. Just delete them from the list My test condition was as follows: I used my old Nvidia RTX 2070 to test the SDXL base model 1.0 with the listed parameters. Upon clicking the generate button, the WebUI automatic1111 ran the prompts one by one. The total generation time was 11 minutes and 11 seconds. The average time for each sampler was 35.3 seconds. Running it again, the average time for each sampler was 35.9 seconds, making the total average time 35.6 seconds. This is really fast compared to not using "--medvram," approximately 15 times faster on average. Now let's examine each image for different samplers. I took one series for comparison, and it turns out that these samplers generate quite similar images. They are just normal. The Ancestral samplers give beautiful results, while the SDE provides very good images, and the worst results might be due to insufficient steps. The DPM fast sampler always produces unique images, so I recommend using these samplers And the best ones are these I used these samplers to generate three more images, and all of them turned out to be very good. The generation speed is similar to the results obtained with the old model. Next, I used img2img to test the SDXL refiner model. This model can also be used to generate images as a base model, and the speed is impressively fast, taking only 22 seconds, which is faster than ComfyUI. By the way, the normal SDXL model generation speed is also faster than ComfyUI, especially if we remove the slower samplers, which will take less than 30 seconds. Then, I tried upscaling without using ControlNet. From 1024x1024 to 2048x2048, it took 96.2 seconds, and from 2048x2048 to 4096x4096, it took 477.5 seconds. Both of these upscaling processes were much slower compared to ComfyUI, and the quality also needs improvement, as we can see the tile boundaries sometimes. On the other hand, ComfyUI can directly upscale the image 4 times, from 1024x1024 to 4096x4096, with really good image quality and very fast speed. I even tried upscaling to 16384x16384, where the image size was more than 400 MB, and it only took 305.8 seconds. Using normal ControlNet, It took 232.3 seconds, To get blue eyes in the img2img submenu, I also used a script to make it easy, changing the denoising values when generating the images. We can observe that from 0.3 to 0.5, there is a clear change without altering the original image too much. If the denoising value is set to be very large, the image will change too drastically. In conclusion, with some parameter modifications and adjustments, WebUI A1111 can generate images very fast using the base model, and the refiner process is also very rapid. On the other hand, ComfyUI is extremely fast in the upscaling process. Using WebUI A1111 with the script function makes it easy to find optimized parameters. However, it is challenging to find good parameters when using multi-ControlNet. I hope this will change soon. By the way, Do you know we can directly input text in images? If you enjoy my content, please consider subscribing to my channel. Thanks for watching!
Info
Channel: Tube Underdeveloped
Views: 12,179
Rating: undefined out of 5
Keywords: Stable diffusion model, stable diffusion, stable diffusion tutorial, stable diffusion prompt, how to use stable diffusion, automatic 1111, super easy tutorial, Easy and Comprehensive, Easy and Comprehensive tutorial, stable diffusion sampling, Image upscaling, Super-resolution, Stable Diffusion Upscaler, stable diffusion samplers, SDXL 1.0 model for A1111, SDXL faster, Diffusion processes, Diffusion sampling, SD A1111 fast speed using SDXL
Id: Rc2wg18j1ZY
Channel Id: undefined
Length: 8min 29sec (509 seconds)
Published: Thu Aug 03 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.