Run Stable Diffusion XL For Free In Colab: Including Your Own LoRA Files

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in a previous video here I showed you how you can train your own stable diffusion Excel Laura file low rank adaptation file that helps stable diffusion render new and interesting characters objects places even Styles and we did it completely free using Google collab meaning you don't need your own powerful Windows desktop gaming computer but after you've created that Laura file how do you actually use it what do you do if you don't have a machine that can run stable diffusion locally well that's where Focus comes in focus is one of my favorite projects because they've made stable diffusion really simple and easy to use in fact I'm going to do an entire tutorial how to on running this into to end but for today we really want to focus in on how to do this in Google collab the idea behind Focus was to make stable diffusion as easy to use as mid journey and I think they've done a really fantastic job of this it abstracts away a lot of the crazy inner workings that you normally have to deal with in specialized prompting techniques and right on their GitHub page when you scroll down you'll see this open and collab link go ahead and click on that now the first thing you're going to do when you come here is you're going to click on connect up in this upper right hand corner when you're done it's going to give you this T4 this gives you a basically a GPU instance in Google collab so this will have a GPU with enough memory to run stable diffusion and it'll have enough RAM and dis space for you to do all kinds of cool stuff once that's connected go over here and just click this play button on the left here I it's going to tell you that this collab notebook wasn't authored by Google that's okay go ahead and click run anyway and then you're going to see that it's actually installing Focus right now on this instance so that'll take just a minute to do once it's all done and everything's loaded you're going to see two URLs at the bottom it'll say app started successful use the app with 1271 this is a loop back address it's a local address you can't actually use that because you're not on the same network as the collab machine and then it'll also give you this gradio dolive address this is what you can actually use so click on that and this is going to load up the focus UI and you can see here it is we've got our own stable diffusion software running in the cloud so we can say let's generate an image and just test it out we'll say house by a stream down here in the text box and we'll click generate and just like that here are our first two images and you can see even though my prompt was super simple house by a stream the results are very high quality this is almost photographic quality that's because Focus does a whole bunch of fine-tuning and tweaking on the back end in order to make your images stand out if you put this into standard stable diffusion software like automatic 1111 you're going to have to do a lot more tweaking and tuning to get this high quality result now from here we can dive into the advanced settings click on Advanced and that's going to open up this side panel that has a whole bunch of other options you can select different dimensions and aspect ratios for the images generated change the number of images generated and even enter a negative prompt performance I typically like to jump this up to Quality unless I'm just testing things out and then you can jump over to style this is where you can set a bunch of different preset styles that modify the way that images look let's show you for example we'll go ahead and deselect the three that are on by default and we'll select origami instead we'll click generate we won't change our prompt at all and just like that our house by a stream looks like it's made out of folded paper origami style pretty freaking cool next up we're going to go over to the model tab Now by default this is running the Juggernaut XL stable diffusion model this is based on sdxl or stable diffusion extra large it's a fine-tuned model that has a bunch of extra features built in that make it look a little bit better than sdxl the results are a little bit higher quality you can also select the refiner so you could go with the Juggernaut XL refiner as well that just fine- Tunes the images after they get to about 80 or 90% of the way generated you'll also notice that there's a Laura section and by default it has this sdxl offset example Laura well how do you get your Laura file to show up here let's take a look at that and for this we need to jump back over to the collab section so we jump back over here and you'll notice this icon on the left here is a file folder click on that and you'll see a focus directory drop that down and find find the model section open that and within there you're going to see luras drop that down and you're going to see the section that says put luras here with that directory selected I'm going to go up here and go to upload to session storage select your lower file and then you'll see down here at the bottom it's actually uploading it'll take just a minute now it left it in the sample data folder it didn't actually put it in the Laura folder so when it's done go to the very bottom here click on the file and then you can just drag it up to the Laura's directory perfect so now we've got this pytorch Laura weights file I still need to rename that it's a terrible name but you get the idea you've got it here in the Lura folder now we can jump back into Focus click at the bottom this refresh all files and now you'll see your Laura file is showing up in the drop down so select pytorch Lowa weight safe tensors and then drag this weight up to just about one perfect go back to style and we're going to deselect origami and I'll go with MRE dark cyberpunk for the prompt you're going to need to use your prompts trigger word so for mine it's Tom Cruz man that's all you need to do let's click generate and just like that we're using our custom Laura file we're generating stable diffusion images with it now if you wanted to you could also upload different checkpoint models so you could change out Juggernaut XL for stable diffusion XL or any other variation you want similar to what we did before you jump back over here and you would just upload into the instead of the lures directory you'd upload into the model model directory and then place it under checkpoints that's really all you have to do you'll notice that down here on the dis you've got 43 44 gigabytes available so you've got plenty of space to upload additional files now one thing to note this will time out and actually stop and all of the files that exist in here are going to get deleted so make sure if you've got anything cool like you like one of these images that you write click on it and you actually save the image before it all gets destroyed and lost outside of those caveats really cool way to get started using stable diffusion without your own hardware and PC now if you do need to run Focus locally it'll run on as little as 4 gab of vram so you can have a fairly old video card and still run it without a problem let me know what you think if you have any questions I'm always here to help hit me up in the comments and I'll be doing that deep dive on focus in another video coming up soon as always I'm Brian love it this is all your Tech Ai and we'll see you next time thank you so much the viral in the town breaking down AI wearing the crown from Basics to complex never let you down all your tax ain't I earning the renown
Info
Channel: All Your Tech AI
Views: 1,978
Rating: undefined out of 5
Keywords: stable diffusion, stable diffusion tutorial, google colab, stable diffusion google colab, how to run stable diffusion on google colab, how to use google colab to run stable diffusion, stable diffusion en google colab, stable diffusion colab
Id: kD6kD6G_s7M
Channel Id: undefined
Length: 7min 10sec (430 seconds)
Published: Fri Jan 26 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.