How to Install & Use Stable Diffusion on Windows in 2024 (Easy Way)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if you never installed or used stable diffusion there is the hard way doing it through python that I've tried two times without success and the easy way through comfy UI so I'll show you how to install comy UI and show you how easy it really is I'll show you how to install stable diffusion models so you can generate images how to use custom nodes to make stable diffusion more powerful full and by the end of this video I'll show you how to install the highest quality models so you can get ultimate control just follow this tutorial step by step so you can install and use stable diffusion step number one install comfy UI so just write comfy UI into Google search and click the first link by the way every single link is down in the description now the reason we want to use comfy UI is it's a lot easier the old way of getting stable diffusion would be to download through python that somebody with very low technical knowledge would have a hard time doing with comfy UI all you have to do is just download a couple of things and then it will work in this node base now you might be thinking hey this looks pretty complicated man but actually when you get into it it's so simple and I'll explain everything to you in a later step so how do we install well all you need to do is scroll down a little bit and you will go to the installing here just click on direct link to download and you will start downloading this one is around 1.4 GB so just wait for it to install now just go through your downloads folder until you find this file which is a ZIP file right click on it click on extract all and extract then you will get this folder I recommend that you cut it away from the downloads folder go to documents make a new folder named Ai and paste it in here this will make it easier for the later steps now let's double click it and here there are two run files that you need to look out for the first one is run CPU and the second one is run Nvidia GPU and this is important if you have an Nvidia graphics card the model we're going to run today needs around 8 GB of vram and if you're running a Mac with M1 two or three I've left a link in the description to download it on Mac as well it's a little bit different but you can still get it to work but how do you find out how much vram you have well just click Windows R and write DX dag click okay click on yes and you can now see what you are working with just click on the display in the top and you can see I have the AMD Radeon graphics that only has 400 MB of vram and I have my GPU Nvidia GeForce RTX 3070 laptop with 8 GB of vram so check your requirements before you continue so now that you know we can just click on run Nvidia GPU it will for you install a bunch of packages so it will take a little bit of time but for me what happens is it opens the comy UI in my web browser but the main issue is that if you've done every single step now you won't actually have any models here that you can use to generate an image so that's why stop taking meeting notes let AI do it for you just get TLD DV for free and it works inside of Zoom Google meet and teams I just had this short meeting now I can summarize main ideas create a list of next action steps or even generate sales rep performance report you can even provide a custom prompt and generate we just got an instant summary you can also use the AI report Builder if you have have multiple meetings with one clients and summarize all of them then you can schedule this to happen recurringly you get your AI report that you can schedule to happen every Friday that then integrates with your favorite tools from slack to HubSpot download TLD DV by clicking the link in the description down below and put AI into your meetings thanks to tlv for sponsoring this video so that's why we're going to go to step number two install stable diffusion the first thing we're going to download is the stable diffusion XL base 1.0 again links to all of them are in the description below and all you need to do is go down and download this one called save tensors now the file size is quite high on this so depending on your internet speed this might take some time for me it took around 30 minutes and all you need to do is click on this download file now I'll show you actually a better model that I like more but this is the original stable diffusion base so if you want the raw unfiltered base this is the one to get now the second thing you need to download is the stable diffusion refiner so I'm just going to scroll down a little bit and here you see the same thing happen we're going to download the first one save tensor and click on this download button again this is 6 GB so it might take some time the last thing is the sdxl V once again just start scrolling down and let's download this one a little lower file size on this just click the download file and if you're downloading all these models now I would recommend also downloading this think diffusion XL model that I'll show you later in this video but if you're but if you're following step by step I highly recommend to follow the link in the description and download this as well once the files are downloaded I need to show you where to put them so let's imagine these are the files I'm just going to cut them then we go inside of the the AI documents click on config UI then click on models then click checkpoints this is where you're going to paste the base and the refiner now we only have the v file left so I'm going to cut that away from this folder go back one step to the models again then scroll down until we find V now just paste your v in here if you've come this far you're doing amazing all you need to do is Step number three generate the image now that everything is installed we just click on run Nvidia GPU again this screen will load for a bit and then you'll open this in your Chrome if it doesn't open automatically just take this HTTP link and copy and paste it to your browser now let's the fun begin and if you think this looks very complicated it really isn't and once you get a hang of it maybe you'll actually like this a lot better than other interfaces but let's start at the beginning where we load a checkpoint since you loaded them into the model folder before you can see that they are now here the base and the refiner so we'll just use the base now you can see this clip path goes up to this clip text en code prompt this is the positive prompt or basically what you want it to make so let's go simple red apple right below it you have the negative prompt this is things that you don't want to be in the image so you could say blur noise and things like this now here you see the image you will generate I have it set to 1280 by 720 and the batch size is four meaning I'll generate four Images I'm going to put it on one because it's faster to generate then we go over to the actual K sampler this is what actually creates your image the recommended settings is to go the older sample name steps between 20 and 30 CFG I like around 8 to 10 10 and the rest I keep on default now we can create our first image by just clicking this Q prompt now you'll see it starts loading with a green kind of stroke around it sometimes this might load for a while and that's when you can take up this terminal and it will see that it's trying to fetch some data right now and sometimes you might even have to install some stuff so just be patient let it load and now it moved to the next step where it's actually reading our prompt it then has moved to the K sampler and you will soon start to see a bar in the top start to fill as you can see it's downloading some things and just like that our first image is generated the first one always takes a little longer let's try another prompt like a man showing an iPad to the camera and let's Q prompt again this time will be a lot faster and depending on how many images you are generating and the file size this will take shorter or longer just like that it goes into the VA code and we get the new image as you can see this is the quality that you get from the base model and if you're used to prompting inside of chat gbt it takes a little bit of a different prompting style but let me show you some good results with my favorite model in a minute just one more example like a gorgeous Viking woman at the top of the mountain Q prompt it's loading again and here is the final image a woman that looks like she would carry you into bed but is that all you can do with comfy Ai and how do we actually get the best output that's why we have step number four comfy UI manager just go to the comfy UI manager on GitHub because this is where we're going to install a bunch of add-ons and this is by far the easiest way to do it just scroll a little bit down and the first step is to get to the CD custom nodes ter terminal as you can see this is inside of comy UI then custom nodes then you just want to rightclick and click on open Terminal as you can see we're now running inside of the correct folder now just copy this git clone and paste it right in here click on enter and it will take a little bit to install now you can close it now we just go to config UI and click on restart now you can see that we have this manager button in the bottom right and the most important button here is install custom nodes as you can see they have hundreds of different custom nodes that you can install to do different things for you for example if I search reactor this is a node that I was playing with yesterday the fast and simple R like face swap extension node so you can just click on install here then we can search for open pose where you can apply a pose of a character and then you'll actually render out that post for the character once they're installed you can now right click add node and you have your new nodes you downloaded here for example reactor you have three different nodes that you now have access to that have these inputs and outputs for example to use this fast face swap they need an image so we're going to use this as the input image we need to rightclick add node image and load image where I'm going to upload an image of my face something like this put the image into the source image then in the save image I'm just going to drag over this one now we can change the prompt we cue The Prompt you'll now see that it's also having this green circle around it before and here is the image we got yeah we definitely need some prompting help and I guess is this supposed to be me that's why we go to the last step to get higher quality just go to civit ai.com because this is where you can download a lot of custom models and get exactly what you're looking for just click on the models tab in the top then we can filter by highest rated most downloaded and you'll see the top models here I tested a bunch of them and I believe there's one thing that you should do before you start installing and that is to actually test them on civit AI itself say you like this model for example instead of downloading it being 6 GB and taking a little bit of time you can actually click on this run model and go to cart which is a free image generator and now you can just run the same prompt Again by clicking here and test the entire model I'm just going to run it and just like that we tested the model even before downloading it so you can get higher quality images this think diffusion XL I'll leave in the description down below because it's my favorite and once you've downloaded it just put it into the models folder that we did for the Bas and the refin ER so you now know how to install and use stable diffusion like the video see the description below and I'll see you in next video
Info
Channel: AI Andy
Views: 15,618
Rating: undefined out of 5
Keywords:
Id: pXvT9hdJ2_g
Channel Id: undefined
Length: 13min 7sec (787 seconds)
Published: Wed Feb 07 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.