How To Use SDXL in Automatic1111 Web UI - SD Web UI vs ComfyUI - Easy Local Install Tutorial / Guide

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Greetings everyone. In this video, I will show you how to install Automatic1111 web UI for Stable Diffusion X-Large model SDXL. I will compare the results of Automatic1111 web UI and ComfyUI for SDXL. I will show how you can use your SDXL trained LoRA models with Automatic1111 web UI. I will make a speed comparison test with Automatic1111 web UI and also Comfy UI. I will explain the logic of branches in GitHub repositories. Moreover, I will show the upcoming new features of SD web UI. So I have prepared a very detailed GitHub readme file for this tutorial. Every instruction and commands that you are going to need are written here. The links are provided here. I will update this file in future if it be necessary if something changes. So always look for this file and read it when you are watching this tutorial. I made an automatic installer script and posted it on Patreon. I also have prepared manual installation steps. So let's begin with automatic installation. Open this post, download the attached files, click them, move them into any folder where you want to install. So I did put the files here, double click this auto_1111_sdxl.bat file, click more info, run anyway, and you don't need to do anything else. It will install the latest version of Automatic1111 web UI that supports SDXL and it will also download the SDXL models for you. Let's also do our manual installation. First of all, you need to download SDXL base and refiner models. Open these two links. When you click the link, it will ask you researcher early access agreement like this. Go to very bottom, fill the fields as you wish. I am filling them with my. Check this checkbox and submit application. After that, you will be automatically approved. Then you need to download SDXL base 0.9 safetensors file. Click this download icon. The download will begin. Also, this is the refiner. Currently Automatic1111 web UI is not supporting refiner, but I am pretty sure it will come very soon. Also, don't download refiner model from here by clicking this download icon. Then we will clone the Automatic1111 web UI. This is its link and there is 1.5 version SDXL change log. There are some major improvements that is coming with 1.5 version of Automatic1111 web UI. It is starting to support SDXL and the best new feature is LoRA extension rework to include other types of networks. With this update, we will be able to use all of the LoRA types that we have trained or that we have downloaded from CivitAI or other places. Previously, we had to use SD web UI additional networks extension, but from now on we won't be have to use that extension. So let's begin with cloning it. Right click and copy link address. Make a new folder wherever you want to clone. So I will install my Automatic1111 into auto1111 install folder inside C drive. Click here, type CMD and it will start a new CMD window inside this folder. Type git clone and paste the copied link. It will clone it into this folder. By the way, you need to have installed Python and git. Here I have an amazing tutorial for that and here the download links for Python and git. Watch this tutorial if you don't know how to install Python. OK, cloning has been completed. There is one key issue. You see on the GitHub repository of Stable Diffusion web UI the last commit was last week. So where is this SDXL support? When you click here, you will see all of the branches of Stable Diffusion web UI GitHub repository. So what are these branches? Branches are used to do experimental development and first commit the new changes into these branches, verify them and then later merge them into master branch. So they are more like experimentation. So you see there were SDXL branch. Now it is merged into development branch. How do I know? When you click branches here you will see active branches and their latest updates. So this SDXL release candidate were merged into development branch. How do I know? When I click the dev branch it will show me that this branch is 282 commits ahead of master. Also, you see there is a message written here. Merge branch release candidate into development. So this is currently the most active, most up to date branch. Therefore, we are going to use this development branch to have SDXL support with SD web UI. And how are we going to do that? While your CMD folder is your Automatic1111 install, then you are ready. But currently we are not there yet. So enter inside your cloned folder. Open a new CMD like this. You see currently I am in Stable Diffusion web UI folder, then copy this command and paste it. And now we are switching to a new branch development. What if, if you want to return back to original branch, all you need to do is get checkout master and then you will be returned back to original master branch. But for SDXL currently only development branch is supporting SDXL. So we will use development branch. After this, you need to add these command line arguments. No-half-vae. And I am preferring xFormers because it is working great with SDXL. However, if you have a low VRAM, then you should try medvram and lowvram options, but try these only if you get out of VRAM memory error while using it. So where is these commands are written? Go to your installation folder, right click webui-user.bat file. If you're not seeing the file extension, go to views here and check file name extensions checkbox. So right click. I will edit with Notepad++ which is a free text editor. So you see this is where we are writing our commands and I will add the commands like this. After that, all I need to do is just double click and start it and it will install everything according to the development branch. Also, we need to move our downloaded models. I will cut them move back into my install folder. Inside models, inside Stable Diffusion. So this is where Stable Diffusion models are put. I will just cut and paste them here. So what if, if you have existing installation of Automatic1111 web UI, and you don't want to install a new one? So go to your existing installation, which I have here automatic web UI, start a new CMD. First, you need to update it. So copy this command "git pull" paste it. This will check the GitHub repository of Automatic1111 web UI and it will fetch all of the newest changes as you are seeing right now. Then we will do "git checkout dev" branch. And now I am in the development branch and I am ready to use my existing installation as well. Don't forget to copy paste your SDXL models into the models folder. So the rest is same with the new manual installation. Also, don't forget to put no-half-vae. You should not use no-half-vae with SD 1.5 versions if you are not getting VAE error. Because it will reduce your image generation speed. After installation has been completed, double click webui-user.bat file, and it will start your web UI instance. Once you started your instance, you will get your local running URL like this. And you see, it generates the SDXL base YAML file automatically this time, so we don't have to waste time with YAML files. So let's open our web UI. And now I can see SDXL based version is loaded like this. We can generate anything we wish. So I prepared a prompt to test out. Copy the prompt here. Let's paste it here. Copy the negative from here. Let's paste it here. SDXL base resolution is 1024 and 1024. If you want to obtain best quality images, then this is the resolution that you should use. Let's hit generate. And let's look at the speed while I am recording a video. It is pretty decent. When I'm not recording a video, it is up to 3.2 it per second. Okay, we got a picture. This is the first picture. Let's generate another one. And here another one. Okay, now we are getting a very good one. Okay, this one is amazing. Look at the details. And we are not even using the refiner of SDXL. Once it is implemented into Automatic1111 web UI, I think it will be amazing. Let's try with high resolution fix and also, let's use the same seed value. Okay, let's make the denoising strength as like 50%. And let's hit generate. When it will do high resolution fix steps, it will be much slower. Okay, high resolution steps are started, it is 1.7 seconds per it. It is upscaling 1024 into 2048. So from 1 megapixel to 4 megapixels. The speed is really really decent. And this is my webui-user.bat file I'm using. Okay, the image has been generated. Let's look at the details. Okay, you see this is 4 megapixels with high resolution fix. And the details are just amazing, amazing quality. And this is without refiner. When we have SDXL refiner, I think it will be the best ever generated images with Stable Diffusion so far. But even this image has so much details is looking amazing. Now let's compare it with the ComfyUI. If you don't know how to use ComfyUI, I have excellent tutorial here, just watch it, and you will learn how to install and use Comfy UI along with SDXL as well. Before starting my ComfyUI, I will update it. So let's run the update file. Maybe there are some changes. Okay. Then let's start with Nvidia GPU. By the way, I am currently using this much VRAM. So I will close Automatic1111 web UI instance. So I will load my Comfy UI workflow. It is here. Currently, it is also supporting the refiner. So let's see. These are positive prompts. These are negative prompts. Unfortunately, we can't compare with the same seed because the seeding algorithm of ComfyUI is different than Automatic1111 web UI. Therefore, even I have used this seed, it won't be the same. So let's queue the prompt and see the speed. Okay, the speed is much slower than Automatic1111 web UI. We were getting 2.7 it per second while I am recording video. With ComfyUI, we are only getting 1.45 it per second. Now the refiner will begin. You see it has loaded the refiner model. It is using this much VRAM at the moment. Okay, refiner steps are started. The refiner steps are slower than the base model generation. And we got the images. Okay, let's open images. So this is the base image. And here the refiner image. Okay, base image, refiner image, it is looking very, very different than Automatic1111 web UI. So let's make a comparison. But of course, these are not the same seeds. But the difference is huge. So the outputs are saved inside output, inside txt2img-images. Here, we will see the generated image. And here we see on the left Automatic1111 web UI base image. On the right ComfyUI base image. Unfortunately, since they are not same seed, I can't say which one is working better. And now we see on the left high resolution fix Automatic1111 web UI image and on the right refiner output of ComfyUI. I think high resolution fix is adding much more details than refiner itself. But if the refiner were available, it would be much better. But since they are not the same seed, as I said, we are not able to fully compare them. However, the speed of Automatic1111 web UI is much better than the Comfy UI at the moment. Okay, here another comparison on the left: Automatic1111 web UI on the right: Comfy UI. I don't know whether if any one of them is not working properly or not. But the style difference, the output difference is huge. So this is the results of the both UIs. So how you can use SDXL LoRAs with Automatic1111 web UI. Enter inside models, enter inside LoRA folder and put your trained LoRA files in here. Test9 is my own LoRA. If you don't know how to do SDXL and LoRA training, I have an amazing tutorial for that. The link is here. Watch this and you will be able to train your own LoRAs with the best known settings. So I had posted this yesterday and it went viral. Now I will show how did I generated these images as you are seeing right now. Let's load into PNG info and regenerate them. Okay, let's go to the PNG info. Here the generated output images. For example, let's pick which one. This one. Yes. PNG info, send text to image tab. Okay. These were all the settings. I didn't use any negative prompt. 1024 1024. This was the seed value. And this is my LoRA. How you are going to use LoRAs? Click this icon, go to LoRA, click refresh, and you will see all of the LoRAs that you have. And when you click one of the LoRA like this, it will get added. So let's hit generate and let's regenerate the same image. I am glad that now it supports all of the LoRA types and it is amazing. And here we are getting the image and here the generated image. It is amazing. With Automatic web UI, you have all of the amazing features when compared to ComfyUI. They are much harder to use in Comfy UI. You can use image the image, you can use inpaint, you can do high resolution fix. You can send to extras and do upscaling. All of the favorite features we have with Automatic1111 web UI now working with SDXL. However, ControlNet is still not available. I think it will become available very soon after the official 1.0 version release of SDXL. I hope you have enjoyed this video, please subscribe, support me by joining YouTube channel, leave a comment, share the video. I have other amazing tutorials for SDXL as you are seeing on the screen right now. Also in this particular tutorial, I have in more depth explained how to install and use Automatic1111 web UI. This is the SDXL LoRA training. And this is my famous most realistic training for faces. SDXL is also amazing. The quality of the clothing is much better than SD 1.5 version based models. If you also support me on Patreon, I would appreciate that very much. My YouTube revenue is very low. So with my Patreon supporters, I am able to continue producing higher quality videos and doing more research for you. You can also follow me on LinkedIn and also on Twitter. Hopefully see you in another amazing tutorial.
Info
Channel: SECourses
Views: 23,023
Rating: undefined out of 5
Keywords: automatic, automatic1111, guide, tutorial, how to, tips, tricks, sd, sd web, sd web ui, web ui, stable diffusion, stable diffusion x-large, sdxl, install, setup, download, sd xl, auto1111, auto 1111, automatic 1111, automatic 11 11, generative ai, midjourney, dall e
Id: eY_v5IR4dUQ
Channel Id: undefined
Length: 15min 43sec (943 seconds)
Published: Thu Jul 20 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.