Install Stable Diffusion Locally (Quick Setup Guide)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video I'm going to show you how to set up and run stable diffusion locally if you're on a PC as well as how to run it in the cloud if maybe you're on an older computer or a Mac and once you've got stable diffusion set up it opens up so many cool possibilities of things that you can do with AI art and I can't wait to dig in so let's go why would you want to actually have stable diffusion installed on your own computer well the answer to that is there's zero limits with it you can literally create anything you want with stable diffusion when it's installed locally when you're using mid Journey they have some restrictions some words you can't use if you want to create not safe for work content you can't do it if you want to use words like blood in your images they'll restrict you from doing it now if you have stable diffusion installed locally you can also use it with your own trained images if you've watched my previous tutorial where I showed you how to actually train your face into the AI the ckpt file that it generated when you followed through on that process you can actually use that model inside of stable diffusion and generate as many images as you want with your own face on them having it locally installed has all sorts of other benefits you can use all of the cool control net features things like getting it to model your exact pose you can add the scribble control Network you draw a scribble drawing and it will try to draw a realistic version of that image you can set it up with image to image where you upload an image and it tries to create another image that looks similar to it you can set it up with instruct picks to picks you upload an image and then give it text commands to tweak that image you can set up deforum on it which is a video generator that uses stable diffusion to generate really awesome videos if you have a local install of it it's pretty much Limitless to what you can do with it now in order to install it locally you're going to need a PC and you're going to need a pretty decent graphics card however if you have an older computer or if you're on a Mac I'm going to show you an alternative that will get you all the same benefits of a local install so the first thing you're going to want to do is go to huggingface.co and you're going to create a free account just click up here on sign up create a free account once you have a hugging face account you're also going to want a GitHub account so go to github.com come over here sign up once again totally free to have a GitHub account so the next thing you need to do is you need to download a software for Windows called get for Windows so if you go to get for windows.org you can download it it's also completely free just come up here and click download once this is done downloading go ahead and click on it to launch the installer go ahead and click install once it's done installing go ahead and launch it and click finish we're going to go ahead and minimize this for now so the next thing you're going to want to do is create a new folder on your hard drive let's go ahead and call it Ai and let's just start with that we're going to right click on this AI folder and we're going to select copy now we're going to open up this get bash that we created earlier we're going to type CD which stands for change directory and then we're going to right click and we're going to paste in what we just created here and then we're going to hit enter now we're going to come back over to GitHub here and we're going to search for automatic 11 11. you can see that it shows automatic 1111 stable diffusion web UI we're going to go ahead and jump to that there and then over on this green button we're going to click here on this Arrow next to code and then you can see a URL here let's go ahead and copy this URL we're going to open up our get bash here again and we're going to type this command get and then we're going to type space and then we're going to type clone and then we're going to right click right next to this and we're going to paste in the URL that we just copied and we're going to hit enter now it's going to take a minute or so and it's going to start the process of installing automatic 1111 which is the user interface that you use to interact with stable diffusion all right so once that's done installing we need to go download the stable diffusion files from hugging face so we'll search out stable diffusion there's multiple models you can choose from 1.4 1.5 2.1 and 1.4 original I still use the 1.4 original most of the images that you see where I've trained my face into it it is using 1.4 so go ahead and select stable to Fusion 1.4 original and then under download weights go ahead and download the sdv1-4 ckpt now this is a large file so it will probably take some time to download but go ahead and get that process started you can see that it's four gigabytes so just let that download after you've got the 1.4 model feel free to download the 1.5 model and the 2.1 model so that you can add those into stable diffusion as well and experiment with the differences just keep in mind that each model does run about four gigabytes and the more models you have the more hard drive space you're gonna end up taking up now while we're waiting for that to download you're going to want to install python on your computer so head on over to python.org come up here to downloads we'll come down to Windows and let's download the latest stable release which is 3.10.10 as of the recording of this video so we'll scroll down and we'll grab the windows installer down here once it's downloaded we'll go ahead and install it all right now that we've got python installed we'll go ahead and just close out of that we'll open back up our folders let's double click into this AI folder that we created earlier double click into stable diffusion web UI look for this folder called models here and open that models folder double click into stable diffusion and then under here it says put stable diffusion checkpoints here so remember that stable diffusion 1.4 file that took forever to download well we're going to put it right inside of this folder here stable diffusion web UI models stable diffusion so grab it from wherever you downloaded it to and paste that into this folder here now if you watched my previous video on how to inject yourself into the AI if you selected this option here to save to Google Drive back during that training you should have your own trained model inside of Google Drive now you could toss that file on the same exact folder models Dash stable diffusion and that will also show up as one of your available models that you can generate images from inside of stable diffusion alright so the next thing we're going to do is we're going to hit back to our stable diffusion web UI folder again and we're going to scroll down and we're going to look for this web ui-user dot bat if you double click on that you're going to see it start to run a whole bunch of scripts and these scripts are going to take a little while to run so go ahead and just step away grab a snack or something and let it do its thing as you can see on my screen right now it's showing ETA somewhere around 30 minutes once it's all done processing you'll see down at the bottom here it'll say running on local URL and it'll have a web address here just double click on that go ahead and hit Ctrl C to copy that jump over to your web browser paste that URL in up at the top and once you do that you are inside a stable diffusion running stable diffusion 1.4 you can now generate any image you imagine now there are a lot of settings here a lot to play around with basically if we come down here we set our batch size to four it'll generate four Images every time we run something I can go ahead and say a photo realistic image of of Brad Pitt covered in tattoos eating a baseball bat and click generate you see that it will run and start to generate the images and this is what it thinks a photo of Brad Pitt with tattoos eating a baseball bat looks like now when you first get in here I recommend playing around with some of the sampling steps try different numbers try some of the sampling methods I personally really like some of the results I get with this ddim as well but try some of these different ones in here because you will get different results from them try different CFG scales so for example if I crank this up to 14 here leave this one set on ddim this time add generate again you'll notice that the style of the images should be completely different there you go completely different style of images now I did mention that if you don't have a PC or you don't have a strong enough GPU to run stable diffusion locally I do have an alternative that's really really awesome it's called run diffusion and you can find it over at rundefusion.com now this isn't a free option but it only costs 50 cents per hour and you get to run 15 minutes for free the first time you mess with it and the cool thing about run diffusion is it skips everything I just showed you where you're installing it locally on your computer and it actually runs it in the cloud you're using run diffusion's gpus and their computers to actually run this automatic 1111 stable diffusion let's just jump into run diffusion real quick I'm going to go ahead and click on get started now I do already have an account with them but if you don't have an account go ahead and sign up for one so I'm going to log in and you can see that they have three different types of gpus that you could run them on one's 50 cents an hour one's 99 Cents an hour one's a dollar seventy five an hour and really the main difference between these three is how fast it's going to generate the images for you you can see the 50 cents an hour one generates images in three seconds 99 Cents an hour two seconds and this one is actually 250 an hour and it will generate in one point six seconds so let's go ahead and select the 50 cents an hour option we'll jump in here I have 27.70 in credits already loaded into my account so let's go ahead and start a session it asks how long should we keep the session running so that you don't leave it running overnight by accident ended up charging all of your credits here I'm gonna go ahead and leave it on for one hour if you use less than an hour you jump out it will give you back whatever you didn't use so it's not going to spend a whole hour's worth of credits if you set it for an hour and you only jump in and use it for 20 minutes so we're going to go ahead and scroll down and click on launch it's going to start the little setup process when you get into it it does take two to four minutes for it to basically turn on the computer for you once it's ready it's gonna play a little chime for us and we'll know it's good to go so we can jump over to a different tab watch a YouTube video do whatever we want while this is booting up and it's going to give us a little chime when it's ready all right so we got our little sound notification to let us know that we are ready to roll let's go ahead and hide that for now and as you can see this looks pretty much identical to the stable diffusion that we just installed locally but what's really cool about this is remember we installed stable diffusion 1.4 in that last one and I said there's other models that you can play with 1.5 2.1 Etc they have multiple of those other models that you could play with already pre-set up in here for you to use so let's go ahead and select this one called anything V3 safe tensors select our sampling method as ddim here because I really like that let's set our batch size to four and let's generate a water color illustration of a wolf in the forest eating tacos realistic high definition trending on our station go ahead and click generate it will start generating my images and it's actually pretty much just as fast as when I did it on my computer and here's my watercolor drawings of a wolf eating tacos in the forest this one has a human hand surprisingly it actually has the right amount of fingers too so that's how you set up stable diffusion in automatic 11 11 you can literally generate anything you can imagine there's no restrictions since it's either locally installed or paying for a cloud GPU there's no limit to what types of images you can or cannot generate with this and there's all sorts of different settings that you can play with instead of automatic 11 11. the main reason I wanted to make this video for you is because I felt a little bit restrained on my YouTube channel because there's a lot of cool stuff I want to show you guys around things like d4m which is a tool to make cool animated videos with AI and these various control net plug-ins where you can get the exact pose that you want and the control net scribble where you can scribble a drawing and it will try to model it a lot of this stuff I haven't really been able to show you the full extent of what it's capable of because a lot of it requires that you have automatic 1111 either installed or running on a Cloud Server but now that I have this tutorial and now that you as a viewer know how to install this I have a video that I can point people to to say make sure you're running automatic 11 11 in stable diffusion and then here's some cool stuff you can do with it it opens up a world of possibilities of what you can generate with images and videos using stable diffusion that you're just not gonna get from hugging face spaces or Google collabs it's just so much more possibilities when you have it installed locally or running on a cloud GPU this is going to be the first of probably many many many more videos where I dive into really cool stuff that you can do with stable diffusion so really exciting stuff in the pipeline and I'm excited to share even deeper what you can do with stable diffusion in automatic 11 11 because it's just going to blow your mind that you can do this and it doesn't take a PhD to figure out how to do it I'm excited to share all that with you if you like nerd not about all this stuff and you want to learn about more cool AI tools make sure you head on over to Future tools this is where I curate all of the coolest tools that I come across I add some somewhere between 10 to 20 new tools every single day to this site and share them with you so you can check them out as well if that's too many tools click on Matt's picks it'll narrow it down to 132 tools that are just the ones that I play with the most and if even that's too much for you make sure you join the free newsletter because if you're on the free newsletter I send you the tldr of everything that's happened in AI that week and just my five favorite tools so you can find all of that at futuretools.io thanks so much for tuning in hopefully you enjoyed this video hopefully you found it helpful I'm excited that you're going to be learning stable diffusion now and doing some really really cool stuff with automatic 11 11 with me so I'll see you in some future videos thanks again maybe press the Subscribe or like button that always is helpful to me and I really appreciate it alright thanks so much bye foreign [Music]
Info
Channel: Matt Wolfe
Views: 455,360
Rating: undefined out of 5
Keywords: AI, AI Art, AI Art Models, AI Art Tutorial, Artificial Intelligence, Automatic1111, Cloud Stable Diffusion, ControlNet, Deep Learning, Deforum, Digital Marketing, Dreambooth, FutureTools, Futurism, Generative Art, GitHub, Hugging Face, Install Stable Diffusion, Internet Marketing, Local Install, Local Stable Diffusion, Machine Learning, MidJourney, MidJourney Alternative, Pix2Pix, Stable Diffusion, Stable Diffusion Tutorial, matt wolfe
Id: Po-ykkCLE6M
Channel Id: undefined
Length: 14min 2sec (842 seconds)
Published: Mon Feb 20 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.