ComfyUI - Vast.ai: tutorial - how to rent cheap high VRAM GPUs for your AI art

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone if you want to run stable diffusion and do not have a powerful GPU graphics card the best way is to set a cloud virtual machine with a high-end GPU and vrm in this video I will show you how to set up comfy UI the node base user interface with a virtual machine from vast AI the cheapest from the market let's get started vast AI is a Marketplace for cloud computing large-scale data centers and also small users with powerful gpus rent their computers so you can rent their machines for a fraction of what would cost you a computer with a new graphics card in this tutorial I will show you how to sign up and log into vast AI select the right Docker template to use later with comfy UI filter and select the right instance install comfy UI and load models loras and control net run comfy UI the first thing to do is to open an account in vast AI this can easily be done you need a valid email address and a credit card after the email is verified a small amount of free credit is provided to test I already have an account so I just log in using my email address and start with the process in vast AI you can select a series of Docker templates to set the image of your instance there is indeed the possibility to directly install a comfy UI template however I do not recommend to do it like this instead I am going to show you how to install the stable diffusion fast image and then install comfy UI manually select templates in the menu then search for the stable diffusion fast template and select it when the template is loaded click to edit image and again edit to the diffusion fast template click and make sure that the Jupiter lab interface is selected after that delete the shell scripts.sh from the onstart script when finished scroll down to the bottom and Save [Music] now we are going to start looking for the right GPU first thing to do is determine how much disk space you want this will depend on how much you will use it I recommend a minimum of 40 gigabytes as I will use in this demo however if you are generating animations load videos and many models you may want to increase it up to 100 gigabytes in addition to the GPU you pay for storage too storage is paid even if the instance is stopped so take this into account when you choose the size of your drive the second thing to do is to filter by reliability you want your machine not to stop while working so a value above 99 is recommended many of the machines in vast AI are from individuals that want to earn some money from renting their machines if you are concerned with what these persons may do with your data you may want to use only machines from Big Data Centers you can also filter by price but as you can sort by Price maybe this is unnecessary finally you choose the GPU Ram of your machine I like to use at least 24 gigabytes so I move the slider to a value just below 24. with these filters you can start looking at the single machines and select the one you want [Music] you can choose on-demand or interruptible machines interruptible machines have a lower price but if another user pays some more money your session will be terminated without warning therefore I recommend that you use on-demand machines only you can also select the geographical area you want the machine to be from you can select any machine worldwide but the recommendation is to do rent machines from your region there will be less lag when executing the commands and running comfy UI now you can start inspecting the price of each GPU by hovering your mouse over the rent button there are three prices to consider the first is the price of renting the GPU unit the GPU is only charged when the machine is running so if you decide to stop the instance while you are not working for example at night you will not be charged that price the second is the price for the storage in this case you pay for the storage when the instance is not running the third price is the price for renting internet this is paid by use not by the hour it is important to check on this price as many machines charge for a very high price you will start consuming your credit very quickly if you are not aware you need to look for machines which have a more reasonable price in the range of three to five dollars per terabyte which may result in 10 to 40 cents per session when possible there are also machines which you do not have to pay for the internet [Music] after inspecting and choosing the machine you want to use it is as simple as clicking on the rent button immediately a new instance will be created you can access it via the pop-up that appears or clicking on the instances button of the left menu after that you only need to wait until the instance is created and you access the Jupiter lab notebook when the machine is ready you connect to the Jupiter lab notebook to start with the comfy UI installation a warning appears but you can just proceed you will see now what commands are to be used for the installation although this is slightly technical do not worry I will make a link in the description below to the script so you can just copy paste first open a new terminal while you are still at the root folder with the first part of the script you are going to install the comfy UI in your workspace folder you are also going to install comfy UI manager which you can later use to install custom nodes just copy that part and paste it in the terminal click enter to start it will take some time to install I stop here the recording to move to the next step just wait until everything is installed OK when this part is finished you could in principle already start with comfy UI however I also include in the script some of the models and control Nets that I like to use of course you can use the models lower ads and embeddings you want you can do that by modifying the script alternatively you can just download the files in your computer and later upload the files to your virtual machine using the folder structure in jupyter lab in my case I will install the Rev animated model some control net models templenet and some lower assets and embeddings from Civic AI like in the previous step copy the code paste in the terminal and run it the installation depending on the size of the models you install can take a while again I will stop the recording while it is being installed you just have to wait until everything is done finally you are ready to start using comfy UI in your rented GPU machine at a very low cost you only need to copy and use the last part of the code in your terminal this part is to set your virtual environment and start comfy UI [Music] when the message that the GUI has started you have to come back to the instances list in vast AI you refresh your screen and the blue button open becomes active you just click on it to open comfy UI so here it is we managed to get comfy UI let's run a prompt with the standard template to see how it works the checkpoint we installed is already selected in the model loader so let's write the positive prompt children playing in a park at Sunset high definition foreign for this example I will keep the rest of the settings but I will add a preview node to see the image on comfy UI the image is also saved which we can later see in the output folder in Jupiter lab when ready we just click to run the prompt and go our first image in comfy UI the last part is about how to install custom nodes for Comfort UI but I recommend to use comfy UI manager it contains a long list of very useful nodes in a very organized way it allows you to install and uninstall as required in this example I will install the comfy UI impact pack the installation takes some time and to take effect you need to restart the comfy uig UI [Music] as I said in the beginning with the automatic comfy UI installation you cannot check when the installation is complete because we have started comfy UI manually we can see in the terminal the progress of the installation when the custom nodes are installed instead of restarting your instance you can stop your comfy UI GUI by using Ctrl Z then again running the last part of the code to start again comfy UI foreign the workflow you had before restart is kept and you can continue with your work but now you have the new custom nodes installed which you can use to create images finally when you want to see and save your work you only need to go to the output folder in Jupiter lab and say that in your local computer well this has been my tutorial about installing and running comfy UI invest AI I hope it has been useful and now you can enjoy comfy UI to make beautiful images thanks for watching
Info
Channel: Koala Nation
Views: 2,179
Rating: undefined out of 5
Keywords: comfyui, stable diffusion, vast.ai, midjourney, artificial intelligen, tutorial, controlnet, comfyui stable diffusion, GPU, rental GPU, cheap GPU, runpod, automatic1111, jupyter, jupyter notebook, jupyter lab, google colab, colab stable diffusion, confyui animation, comfyui nodes, comfyui tutorial, SD, SDXL, SD tutorial, SDXL tutorial, vast.at tutorial
Id: B9va_h1olkk
Channel Id: undefined
Length: 9min 36sec (576 seconds)
Published: Mon Sep 04 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.