How to use Stable Diffusion V2.1 and Different Models in the Web UI - SD 1.5 vs 2.1 vs Anything V3 #310
FurkanGozukara
announced in
Tutorials
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How to use Stable Diffusion V2.1 and Different Models in the Web UI - SD 1.5 vs 2.1 vs Anything V3
Full tutorial: https://www.youtube.com/watch?v=aAyvsX-EpG4
Our Discord : https://discord.gg/HbqgGaZVmr. How to use custom, different, .safetensors and SD 2.1 on Automatic1111 Web UI. If I have been of assistance to you and you would like to show your support for my work, please consider becoming a patron on 🥰 https://www.patreon.com/SECourses
Playlist of Stable Diffusion Tutorials, Automatic1111 and Google Colab Guides, DreamBooth, Textual Inversion / Embedding, LoRA, AI Upscaling, Pix2Pix, Img2Img:
https://www.youtube.com/playlist?list=PL_pbwdIyffsmclLl0O144nQRnezKlNdx3
The used model to generate thumbnail artwork: https://huggingface.co/Linaqruf/anything-v3.0/tree/main
Official page of Stability #AI where you can download all official #StableDiffusion models: https://huggingface.co/stabilityai
.yaml files official repository : https://github.com/Stability-AI/stablediffusion/tree/main/configs/stable-diffusion
Raw #yaml file link of Stable Diffusion 2.1 - 768 pixel : https://raw.githubusercontent.com/Stability-AI/stablediffusion/main/configs/stable-diffusion/v2-inference-v.yaml
Required command line argument : --no-half
Full command line arguments list of automatic1111 web ui : https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings
Analog Diffusion model link page : https://huggingface.co/wavymulder/Analog-Diffusion/tree/main
All version 1 based models yaml raw file : https://raw.githubusercontent.com/CompVis/stable-diffusion/main/configs/stable-diffusion/v1-inference.yaml
Anything V3 model download page : https://huggingface.co/Linaqruf/anything-v3.0/tree/main
00:00:00 Introduction to the video
00:00:38 Official page of Stability AI who released Stable Diffusion models
00:01:14 How to download official Stable Diffusion version 2.1 with 768x768 pixels
00:01:44 How to copy paste the downloaded version 2.1 model into the correct web UI folder
00:02:05 Where to download necessary .yaml files which are the configuration file of Stable Diffusion models
00:02:41 Where to and how to save .yaml file in our web UI installation
00:03:53 Modification of command parameters in webui-user.bat file to properly run version 2.1
00:04:55 What are command line arguments and where to find their full list
00:05:28 The importance of messages displayed in the command window of web ui app
00:06:05 Where to switch between models in the Stable Diffusion web-ui
00:06:36 Test results of version SD (Stable Diffusion) 1.5 with generic keywords
00:07:18 The important thing that you need to be careful when testing and using models
00:08:09 Test results of version SD (Stable Diffusion) 2.1 with generic keywords
00:09:20 How to load and use Analog Diffusion and its test results with generic keywords
00:09:57 Where to get yaml file for version 1.x based models and how to use it for version 1.x based models
00:10:36 Test results of version Stable Diffusion Anything V3
00:11:28 Where you can find different Stable Diffusion models?
00:12:17 Ending speech of the video
Artificial intelligence (AI) has come a long way in recent years, and one area where it has made significant strides is in the composition of artwork. AI models can now generate unique and original works of art that are indistinguishable from those made by humans.
So how does one go about making artwork using AI? There are several approaches that can be taken, each with its own set of benefits and limitations.
One approach is to use a machine learning model that has been trained on a large dataset of images. These models can then be used to generate new images based on certain input parameters. For example, you could train a model on a dataset of paintings and then use it to generate a new painting in the style of a particular artist.
Another approach is to use generative adversarial networks (GANs). These are a type of machine learning model that consists of two neural networks working together. One network generates images, while the other network tries to differentiate between the generated images and real images. As the two networks compete with each other, the generated images become increasingly realistic.
One benefit of using AI to generate artwork is that it allows for the composition of unique and original pieces that would not be possible for a human artist to make. It also has the potential to democratize the art world by allowing anyone with access to the necessary tools to make and sell their own artwork.
However, there are also limitations to consider when using AI to make artwork. For one, the process can be time-consuming and requires a certain level of technical expertise. Additionally, there is still some debate over whether AI-generated art can truly be considered "art" in the same way that human-made art is.
Overall, the use of AI in the composition of artwork is an exciting and rapidly developing field that has the potential to revolutionize the art world. While there are still challenges to be addressed, the possibilities for what can be achieved with AI are endless.
Video Transcription
00:00:01 Greetings everyone.
00:00:02 In this video, I will show you how you can use Stable Diffusion 2.1 with Stable Diffusion
00:00:06 WebUI developed by Automatic1111.
00:00:10 I am working on a full course that will hopefully explain every detail about how to use WebUI
00:00:15 to fully utilize Stable Diffusion.
00:00:18 So while I was trying to make version 2.1 work with the WebUI, I had some difficulties.
00:00:23 So let me show you how you can make Stable Diffusion 2.1 work with the WebUI.
00:00:30 This is the official page of the Stable Diffusion, the Stability AI who releases the models.
00:00:38 And this is their Hugging Face page where they release their models.
00:00:43 You see there are several models and Stable Diffusion 2.1 and there is Stable Diffusion
00:00:48 2.1 base.
00:00:50 So you may ask what is the difference of them.
00:00:54 The base version is 512 by 512 pixels and the regular version is 768 and 768.
00:01:07 So this is the latest and the better version.
00:01:09 I am going to use that on the WebUI.
00:01:14 So I am clicking Files and Versions and I am going to download the file which is ema
00:01:21 pruned.
00:01:22 You see they are same file size.
00:01:24 So you may wonder what is the difference. Ema is for further optimizing, further tuning
00:01:31 the model.
00:01:33 So usually it was larger size, but now it is same size.
00:01:37 So it is better to use that.
00:01:39 You see now I am downloading the file.
00:01:42 Okay so the file has been downloaded.
00:01:44 Let's go to our Downloads folder quickly.
00:01:46 You see the file is here.
00:01:48 I am going to cut it.
00:01:51 And then where am I going to paste this is: I am going to my installation of Stable Diffusion
00:01:56 WebUI and from there I am going to Models and from there you see there is a Stable Diffusion
00:02:00 folder.
00:02:01 I am going to paste it there.
00:02:02 Are we done yet?
00:02:03 No, we are not done yet.
00:02:06 In the Stable Diffusion GitHub, there is a file, it is inside the configs folder and
00:02:13 it is Stable Diffusion folder.
00:02:15 You see there are YAML files, this is for configuration and for 768 pixels, we are going
00:02:24 to use the one ends with the V. Okay, this is the file that we need.
00:02:30 We are going to click raw.
00:02:32 That's where I will put the links of these files into the description of the video.
00:02:38 And in here we are going to click Save As.
00:02:40 We are going to save as this inside our installation, we go to our Models folder and in there we
00:02:47 are going to Stable Diffusion folder and we are going to save it in here.
00:02:51 Okay, are we done yet?
00:02:52 No.
00:02:53 This is saved as txt but its extension has to be txt.
00:02:58 Its extension has to be YAML.
00:03:02 So if you are not able to see the extension like this, you need to go to view and then
00:03:08 from here you see file name and extension is checked.
00:03:13 If I uncheck it, it is displayed like this and it won't work.
00:03:16 You need to check this from here and then you need to right click, rename, delete the
00:03:22 dot txt, now click. Yes, it will become the correct file extension, but we are still not
00:03:30 done yet.
00:03:31 We need to make these files same name. So I'm going to right click and rename, I will copy
00:03:37 the name.
00:03:38 You can also use Ctrl C, Ctrl V or F2 to rename. So when I click F2 it will automatically select
00:03:45 and I will do Ctrl V and it will be pasted like this.
00:03:50 Okay, so now we are ready.
00:03:52 There is one final thing which is modifying the command line of the BAT file that we are
00:04:01 running.
00:04:02 So I'm going to open it with right click and open with, there is no open with, so I'm going
00:04:08 to open it with my text editor which is notepad++.
00:04:14 You can also open it with notepad.
00:04:17 So to open it with notepad, I'm going to open a notepad file like this and I'm going to
00:04:23 drag and drop it so it is opened like this, you can see.
00:04:27 And from here we are going to set two command line arguments which are like this: let me
00:04:32 zoom in, okay, --xformers and --no-half.
00:04:39 xformers is for boosting performance, if your graphic card is not supporting you don't need
00:04:45 to put this and this is necessary for the newest version, it increases its precision.
00:04:52 So if you are wondering what are these command line arguments, the command line arguments
00:04:56 of automatic1111 is released in its wiki. Like this, I will also put this link into
00:05:04 the description and you see there are a lot of command line arguments and you can see
00:05:09 what they are doing.
00:05:12 Okay so then we are saving it with file and save and we are completely ready right now.
00:05:19 We are just clicking webui-user.bat and it will start processing the necessary files.
00:05:28 Okay the messages displayed here is very important, you see I have no error messages here, it
00:05:34 says that the config from this yaml is loaded and the model file loaded from here, the weights
00:05:42 and xformers is applied and also it has loaded the, let me see, hypernetwork that I have
00:05:52 developed and other things.
00:05:54 So I have no errors here, now we open the webui like this, it shows the url in here
00:06:01 as you can see, you can copy and paste that.
00:06:04 Okay from this left and top you can change the models, so if I set the model like this,
00:06:10 let's see what happens.
00:06:12 Okay after I have restarted the application, I am now able to change the model on runtime.
00:06:20 So you see now it is changing the model, loaded model on runtime.
00:06:26 Okay currently the model is loaded and our model is now 2.1 with 768 pixels.
00:06:36 Okay so I have made a test with version 1.5. I have generated 9 images of futuristic tank
00:06:43 artwork with the other all generic keywords and with generic keywords of negative prompt.
00:06:49 I will put all of these positive and negative prompts into the description and the comment
00:06:54 section of the video, so don't worry.
00:06:57 I have used 20 sampling steps and DPM++ SDE Karras as the sampling method. The native resolution
00:07:06 of 1.5 is 512 pixels by 512 pixels. So I didn't change it. I made the batch count 9 and the
00:07:15 seed -1.
00:07:17 There is one another thing. Important thing that I want to mention is that I have unloaded
00:07:22 all of the hypernetworks and embeddings. So this is the raw test of the version 1.5, the
00:07:29 official version.
00:07:32 So each generation took about 15 seconds as you can see on RTX 3060, okay and let's check
00:07:44 out the images right now.
00:07:46 So since they are native resolution 512 pixels, their quality decreases when we display them
00:07:55 in a bigger screen like this. The images like this.
00:07:58 I think they are pretty low quality. Since we didn't use any artist style, we have only
00:08:04 used generic artworks, generic keywords, okay.
00:08:09 Okay now we are seeing results of version 2.1 with the exactly same setup, exactly same
00:08:16 parameters, only I have changed it to native resolution as can be seen here. 768 and I have
00:08:23 changed the model on the runtime as can be seen here, you see it says that model loaded.
00:08:31 Let's check out the images it has generated, okay.
00:08:38 So you see since the resolution is bigger, it is looking better when we do increase in
00:08:45 size when displaying, okay.
00:08:50 Yeah definitely better than version 1.5 but this is because in our prompts we didn't use
00:08:57 any of the style of the existing artists, okay. We have only used the generic keywords.
00:09:06 That is why it is like this.
00:09:10 Also the inference time is more than two times of the regular 1.5 version, okay.
00:09:20 So this time we are seeing analog diffusion results. This is another model that is popular
00:09:28 so you see I have changed it on the runtime again and it takes same about time. With the
00:09:34 original model 1.5. The results are like this as you can see. I can say that it is not very
00:09:43 good by default for generating this kind of images, okay.
00:09:52 To be able to use analog diffusion I have downloaded the file from Hugging Face and
00:09:57 I have generated another YAML file as you can see here, so where did I get this file?
00:10:05 This is the original 1.0 file which you can find on this GitHub page. Let me show you,
00:10:14 it was, one second, here, yeah it is on this page, it was also inside one of my folders.
00:10:23 So I have copied pasted there and it is the same. I will also put link of this with the
00:10:29 same method as I have shown in the beginning, you just save it and name it, okay.
00:10:36 Now this time we are seeing anything v3 model results. I think it is pretty cool when we
00:10:44 consider it, it is older version 1.5 based model, okay. Let's check it out, so I can
00:10:54 say that it is even better than version 2.1 as you can see, okay, I have used the same
00:11:02 setup and same settings, same prompt. So you can try different models, it is always the
00:11:10 same principle. You download the model, you put it inside the model folder and you generate
00:11:16 its YAML file, I don't know how this is pronounced, so I am pronouncing it like that. You just
00:11:24 copy and paste this and rename it like this one. So where you can get these models, you
00:11:30 can get those models on Hugging Face. So this is the official repository. From here I am
00:11:35 clicking Stable Diffusion tag, so it is going to search all models inside the Hugging Face
00:11:42 with Stable Diffusion tag and you see the Arcane Diffusion or the anything v3, anything
00:11:52 v3 is in the top 4 actually as you can see here. So you can also sort by recent updated
00:11:58 or you can sort by most likes, it is up to you, you can try and test different models
00:12:05 from here, just download, copy, paste and change the model from where, from here, click this
00:12:11 and it will refresh the models inside your folder and you are ready to go.
00:12:17 I hope you have enjoyed our video, please consider liking, sharing, commenting our video
00:12:23 to support us. And if you are generous, more generous, you can also support us on Patreon
00:12:29 that would help us significantly to produce better quality videos. So far we have 0 patrons,
00:12:37 but you may be the first one. Thank you very much, hopefully see you in another video.
Beta Was this translation helpful? Give feedback.
All reactions