Running Automatic1111 Stable Diffusion Web UI on a GPU for Free

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys how's it going I wanted to go over how to run automatic 1111 for free with a GPU because a lot of the resources that were previously available such as Google collab are currently being blocked and so it's really hard to now test different models with stable diffusion um using a great resource from AWS called sage maker studio lab that gives you free GPU and free CPU and what you're going to need to do is apply for access to this it'll take about a day it took about a day for me to get approved I'm thinking that's going to be you know pretty standard one to two days but once you get approved you can use basically a python notebook with 8 hours of CPU per day or 4 hours of GPU per day and so if you're going to want to use automatic 11-11 you need the GPU otherwise it's going to be unbearably slow and it's going to be a lot more difficult to set up so once you get access to this and it's very simple to apply for you just add your name and your company so once you get access to it select GPU and click Start runtime and they're going to give you this stupid capture and um it's always the same thing okay so once you get inside of the studio lab what you're going to want to do is create a new terminal you can either create a notebook or a terminal but we're going to do this all through the terminal and I'm going to walk you through each piece it's actually super simple to do this especially with the GPU so first we're going to need to clone the repo we're going to need to clone automatic 1111 stable diffusion web UI and to do that just copy this link from here and then go back to here and then do get clone so we're going to clone this repo locally and then we're going to CD into it and what we're going to need to do is I already have a lot of this installed cuz I've run it before but we're going to need to run this command and basically what this is doing is it's installing a binding to the lower level C code we don't need to worry about any of that CU it's abstracted away from us but basically if you don't install this it's going to throw an error and it's because there's some Bindings that need to be connected to the C code okay so once we have that installed we're actually ready to launch the web UI and that's what this does and we're using this command to basically speed up inference and you don't need to worry about this you can probably even just remove it and this is the important part we're basically tunneling our instance over the Internet so that other people can access it and then we could open it up in a different window and use the UI there and if you haven't heard of enro it's a free service so feel free to create an account and create your own off token to use so that's what I'm doing I'm using my own o token by the time I've recorded this video I'm going to change it so this won't work so you're going to need to create your own but it's simple and it's free so just do that so we copy this and then we're going to go ahead and run this and it's going to be much faster for me because I've already run it before but if it's your first time running this is going to install pie torch and a bunch of um dependencies that are required so it might take a little bit longer but probably like 30 seconds it's pretty fast and so it says launching web U let's wait until okay it's going to download a model for us to use as well and this is the link that we're going to be able to use to um open up the UI and so let's just wait till this is done running I guess I can just copy this and I think this should be done so we can or maybe it's not let's just give it a couple more seconds and I think it actually should be good to go so let's go ahead and open this up awesome so this is our UI that we have and you can try some prompts here I'm just going to try something really simple here and then we're going to run this and let's see if it works yeah it's going to work okay so not quite raining cheese but a bunch of different cheese which is good and if we go back to here we can see the progress everything's being logged to the terminal here I'm going to show you one additional thing that's going to be super useful to you um let's open up another terminal we can download other models besides just the default one and a really good resource to do that is so Civ ai.com so this has a bunch of uh thirdparty models and checkpoints that we can just download and use so we're going to use this one called epic photo gasm which is a bunch of realistic images so let's download this and there's probably a better way to do this and let me know if there is in the comments below I would love to know but what I do is I click this button and then I do copy link address and then we're going to download it in our notebook under models so let's go into models and then CD into stable diffusion and then we're going to do W get I think it was called we're going to name it so do let's see Photo gm. Safe tensors and then paste this in the safe tensors extension basically just prevents malicious code being from being executed once we've downloaded this and you're going to need to check the file extension we know it's do safe tensor here because it's saying it's a safe tensor model but it might not be depending on which model you choose and this website has like like thousands and thousands of different checkpoints and models that you can use so double check but this should work so let's go ahead and download this and it's going to take probably about a minute to download this from the web and we should if we go into here then if we go into models we should see and then if we go into stable diffusion we should see like the progress in this file so I'll open it up hopefully this is working so yeah it's showing the progress here we'll just wait till this is done running and I can also fast forward it okay cool so it's done running 100% is downloaded you're going to have to check this file every now and then but it only took 30 seconds so if we go back to our UI here and if we just click this refresh button we'll be able to see that we now have this new model that we downloaded called photo gasm or epic photog gasm and just wait for it to load and what we can do is we can copy this prompt that they use and put this in here and then copy the negative prompt as well and then just run this and we'll see what happens okay awesome wow looks very realistic hard to even tell that this is AI generated that's pretty cool so yeah hopefully that makes sense I think this is the easiest way to get automatic 1111 stable diffusion webui up and running with the GPU for free and so I think this is an excellent resource to try out and if you into any difficulty let me know in the comments I'm happy to answer any questions the first time you run this it is a bit tricky but hopefully you know this is fairly straightforward and I'll just copy and paste this into the description as well so you can use it so yeah hopefully that was helpful let me know what you think thanks so much bye
Info
Channel: Tosh Velaga
Views: 4,722
Rating: undefined out of 5
Keywords:
Id: _IQj5Pofrt8
Channel Id: undefined
Length: 8min 17sec (497 seconds)
Published: Sat Oct 07 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.