How to rent an on-demand GPU for AI image generation using Vast and Disco Diffusion

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello welcome to vast.ai vast is a global gpu marketplace and we have some of the best gpu prices in the world in particular for consumer graphics cards now this video is for those of you that want to make artwork with disco diffusion so uh i'm going to go slow through this video and kind of show some of the ins and outs of vast it's probably going to take about 15 or 20 minutes and we'll basically be going through all the steps of how to create an account on vast how to uh rent a machine how to find a machine how to rent an instance how to connect to that instance and then how to run the disco diffusion notebook in jupiter so we will not be using google collab we will be using jupiter by itself which is much easier and simpler to set up so you know vast has a lot of users and a lot of different use cases and it definitely will work for disco diffusion if you are coming from google collab or some sort of other provider and you want to try out vast uh it's going to be awesome you're going to be able to get your own graphics cards um the very popular ones right now at the time of me making this video for disco diffusion are the rtx 3090s the a6000s and then the a100s so i would definitely start with the 30 90 and i'll show you how to do that so let's jump into it the first thing you're going to want to do is open up our docs and click on the disco diffusion guide this is not only going to have kind of some helpful you know everything kind of written out for you with all the different steps but it's going to have the links that we're going to need to install the tls certificate that we're going to need later and then also uh to load the the disco diffusion notebook and to get that downloaded onto your machine so go ahead and pop that open and then let's jump into the vast console so this is actually the real-time marketplace that's showing all the offers that are available in the vast marketplace pretty cool the first thing you're going to want to do is actually sign in or create an account so if you do not have an account go ahead and hit the create account button and put in your email address and set a password and then you're going to want to definitely make sure to authenticate your email address uh as well and so find the there's a an email that's going to come to you and you're going to want to click on that to confirm your email address once you get it set up now once you're logged in you're going to see your credit balance and email address displayed in the upper right and you're going to want to jump into the billing section to then add a credit card and to add credits to your account so uh once you have a credit card added you can hit the add credit button and then just put in an amount uh to start with disco diffusion 10 or 15 is going to definitely be enough uh to kind of get your feet wet and then you know depending upon what you want to do and the machines that you want to rent you can go up from there we also accept crypto.com payments if you want to pay with btc eth and more just click on this link to set that up and with vast you purchase credits in advance um so you're going to need credits on your account to get started so once you've added a credit card and got your credits then we can jump over to the create tab and you know start looking at the different gpus which is always fun now the first thing that we're going to want to do for disco diffusion is edit our image and configuration so basically we just want to make sure that we've selected the right docker image so we're going to want to be using the pi torch docker image so you hit select and then select again to open up the configuration menu and you may just want to make sure it looks like this so we're going to be running jupiter and then we're going to be running jupiter direct so this is the easiest option so uh we definitely want to stick with jupiter especially if you're an artist and uh you are just trying to get some artwork and running this on vast you know you definitely want to stick with jupiter it's going to be the easiest jupiter labs is a different interface if you want to play with that later that's great but for this video and what we recommend is to just use vanilla jupiter and then we have a jupiter direct option which is basically going to open up a port on a machine so that your instance has a direct connection to the machine that you're connecting to this is going to make it much faster and more reliable but there is a tls certificate that you're going to have to install on your machine which is going to be a little bit different whether you're on windows mac or linux we definitely have directions on how to do that for those different operating systems and i'll show you how to do it on my windows machine here so select the direct option you know another trade-off with direct is that and you can play with this is that if you uh dis-select this option and you look you're going to get machines that don't have open ports so here we can see this pennsylvania machine has zero ports open sometimes that means the machines are going to be cheaper but you're not going to be able to get that direct connection so you're going to connect to this machine via proxy which is a little bit slower vast automatically sets up the proxy it's nothing that you have to do but it's just a direct connection is a little bit better so i'm going to show you how to set up the direct connection so i'm going to go back into the docker options and i'm going to select direct so once i hit select and save there the last thing that we want to configure before we're totally done with our instance configuration is the disk space so when you create the instance the amount of disk space is allocated at the point of creation there's no way to add more space later so what you're going to want to do is make sure that you can have enough space for the duration of this instance the default is 10 gigabytes we recommend for disco diffusion to up that to about 15 gigabytes you can just slide it up or down i think uh if you're going to be doing video you might want a little bit more maybe 20 or 30 gigabytes but i'll go ahead and just keep it around 15 to start now disco diffusion uh now if we look over here and look at all the gpu offers disco diffusion only can use one gpu at a time so first thing i'm going to do is i'm going to sort and filter for single gpu offers and we definitely want to make sure we're using on-demand offers uh we don't want to be interrupted while we're making our art while the interruptable a little bit cheaper uh you can be outbid in the machine uh you'll lose priority uh on that machine to either somebody that has a higher bid or somebody that's renting on demand so we highly recommend uh renting on demand uh then when you look at the the graphics card you know the the rtx 3090 is a really great place to start that's what i would recommend we also have the a100s and the a6000 so the a6000s are gonna have 40 gigabytes of gpu ram and so once you get really into this you can use the a6000s to make videos and to download and use all the different disco diffusion models it's a very powerful machine and really you know you can see it has that 48 gigabytes of gpu ram which is great um for the 3090s we're gonna have a lot of options on the vast marketplace and so you know basically any of these machines are going to work uh the things to look for are the internet speeds um anything else about the sort of reliability of the host um there's a lot of detail on the instance card and before you rent you always want to hover over the rent button that's going to show you what the base rental price is how much you're charged for storage and then what that total is going to be and then also shows you the charges for internet up and down you're probably going to be downloading a couple gigabytes um so three cents a gigabytes you know that's going to add to your bill a little bit along but the main thing is going to be the base rental price for the gpu the storage uh if you pause the instance or stop the instance you will still be charged for storage but you will not be charged for the base rental price so uh basically you're you're paying for storage to be allocated on this provider's machine and so you have to pay for that up until the point when you destroy it and again for disco diffusion we're basically just going to be making this instance generating some art with it and then destroying the instance after we get our artwork downloaded off of it so i'll go ahead and hit rent and now the instance is booting up in the instances tab now while this is loading uh i'm gonna go ahead and jump over there's something that we need to get which is the modified disco diffusion notebook so linked from our documentation you can see the latest uh disco diffusion notebook at the time right now it's version 5.6 and how this is going to work is you're going to open up this google collab notebook then you're simply just going to download it onto your local computer and then you can close that link now uh looks like jupiter is running on this machine um once you see that open button and it says that it's running give it another 30 to 60 seconds sometimes you hit this open button link and it is a little slow so this warning is expected so this is the tls certificate issue so because uh we're creating a direct connection to this machine and we don't have a certificate it's going to throw this warning so the simple thing to do is just ignore it and proceed um which will then start loading jupiter and get you connected now if you want to fix this which we do recommend that you do fix you can install our tls certificate so linked in the docs is um the directions for how to install the certificate and the link to the certificate from the vast site for windows it's fairly straightforward you download it you click on it you open it and then just follow the wizard to install the certificate once it's done you're actually going to have to reboot the machine which i'm not going to do in this video but once you reboot the machine then you'll never see this security warning again so now we've got jupiter running uh if you've installed the certificate and rebooted uh you're not seeing this secure warning um and the next step is to actually upload the notebook onto this machine so onto this instance so i'm going to go ahead and grab the notebook i can drag it over here and hit upload uh you can also just hit this upload button and find it on your machine once it's on the machine then you can then open the notebook now the notebook might take a minute or two to load but once it does you'll start to see the differences between this and google collab jupiter doesn't take the input boxes out and make it a little bit easy for you to do check boxes or or change the inputs you're actually going to have to modify the code directly so you'll want to scroll down and and actually find some of the clip settings you can actually just do control up and search for clip settings uh and this is where you can actually change any of the options that you want if you want to try the vitl14 uh or any of the other clip models um this is where you would change that and then if you're going to try to do animation or video there's a bunch of settings you can change as well and then of course the main thing that you're going to want to change is the prompt and uh there's no save button everything sort of automatically saves so once you get your settings changed and the prompt ready and it's time to disco so go ahead and hit the cell run all and what this is going to do is start downloading things and getting this instance uh set up to run disco diffusion so this is probably going to take about six or seven minutes it's going to download a bunch of stuff for linux and then it's going to download the clip models [Music] but if you scroll all the way to the bottom you know it's going to right below this diffuse box above the fifth step this is where the image will start to load so just wait here for six or seven minutes and after all the models load you will start to generate your artwork so uh you know with the settings that you uh with everything that you changed in the code here and the settings that you changed mainly the prompt if you actually change this if you actually change this prompt it's not actually going to take effect so basically the this cell needs to be rerun and you need to interrupt the kernel because it's actually just going to keep on making uh art with the first settings so if you want to change your prompt and change some of the settings maybe change some of the models that you're using just want to use this button which will restart the kernel and then re-run the whole notebook and so i can go ahead and do that just to show you uh you know this will start generating a banana now uh the second time you run through the on on this instance the second time you go through this it doesn't have to install anything uh unless you're adding new models so it's actually going to go a lot faster and as you can see it's not going to take six or seven minutes but you know maybe one minute to uh to start generating art and uh once you kind of have your notebook dialed in here you can actually do file um download as a notebook file and then you can change the name of that notebook file on your machine on your computer because this is going to be uh your custom my custom notebook um you know that notebook is going to have all the settings that you need so if you go to vast and you create a new instance and you want to do another 3090 or maybe an a6000 you can actually upload that notebook and it'll have all the same settings that you've just changed so uh some of the other things to show you one um the files when the images start in the artwork starts to appear you can actually jump back into this tab that has the jupiter running and all your artwork is going to appear in this images out time to disco folder you can click on each one to download them uh there's also a way to zip up the files and you know there's a there's a link here zipping up all your images so if you run this for several days and let's say you have a hundred images um you can basically set up uh this zip system and then zip up all the images i don't have any right now so um i can't show you how to do this but you can follow the directions right there to zip up images and download them it's pretty easy but you'll just need to actually open up a terminal for jupiter which to open up a terminal let's see to open up a terminal you're not going to want to do it from the notebook but you're going to want to go back to the jupiter out of home directory then hit new bash and this is where you can open up a terminal and then you can zip up all of your files by installing uh the zip um by installing the zip system and then zipping so there you go and so have fun generating your artwork and uh if you ever have any problems or you get stuck just uh jump on our website chat right here which is in crisp in the lower right hand corner and we can help you out and again definitely follow along with uh our new documentation that's going to have uh the directions all kind of spelled out for you so you can follow along here so i hope you enjoy this video thanks for using vast and have fun with disco diffusion
Info
Channel: Vast AI
Views: 55,501
Rating: undefined out of 5
Keywords:
Id: S4wIFCrKez4
Channel Id: undefined
Length: 19min 31sec (1171 seconds)
Published: Thu Aug 04 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.