Improve Speed and Performance in ComfyUI and Stable Diffusion with LOWVRAM and Workflow Management

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we're going to be talking about how to improve the performance of comfy UI now comfy UI and stable diffusion very powerful software comfor UI is probably the fastest version of stable diffusion but there are a number of things we can do to make it even faster the first thing is if you are running stable diffusion and you're using sdxl uh I'm trying out a different different version of sdxl from the standard one you might want to try using the least number of steps possible sometimes 15 Steps is enough to get a decent image here I did 20 steps and it looks fantastic this is an illustration Atlantis and another thing is when you're working with stable diffusion you have the refiner the refiner does not need a lot of steps it it needs typically about a quarter or about a third the number of steps of the initial refiner so keeping the number of steps down is a really good hint and uh one of the workflows that we had very early on in the arrival of sdxl was this type of workflow where we had the standard sampler here and then we have the standard sampler again but with a low D noise for the refiner model now that turned out to be inefficient and the reason why is because we needed a large number of steps to count at the low D noise number so the Advan advaned sampler if we go and choose the advanced sampler choose the advanced sampler instead that allows us to work differently we can reduce the number of steps to the absolute minimum necessary which can be as few as one4 even 1/5 the number of steps inside of the default base model and we can then run a small number of steps to complete the image typically uh the image is going to be improved just slightly by the refiner model now sdxl is much more challenging and and it's creating two images one for the refiner one for the base model you probably can get away with just using the base model in other words just removing all of the refiner uh stuff inside of a workflow and just use the base model and then you can have a completely different workflow which is just bringing in the image and then working with that image uh on the refiner model that means that we're not doing both workflows every single time we're just doing the base model and then selecting a few images that have worked really well and then using them in a different workflow which is just for the refiner another thing to remember to do is to shut down software that you don't need so I have a piece of software dedicated to recording the screen it actually uses up quite a lot of system resources whilst I'm using it and if I shut that down when I'm not using it that opens up the GPU it opens up uh the the CPU for more uh emphasis on stable diffusion shut down any browsers that you're not using that can have a huge impact on performance tabs within the the browser these can have a massive impact on performance and once we're talking of tabs it might be a good time to talk about some of the courses that I've got on udemy so I've got uh several courses on stable diffusion for comfy UI and uh that goes from basic to master and another course on stable diffusion automatic 1111 probably need to update that course a little bit I really enjoy the interaction with students on UD to me and in actual Fact one of the courses itself this one here was a result of the uh suggestion of a student to introduce some of the things that we're talking about here this is IP adapters and we go into quite a lot of detail with some of this new exciting stuff I'll have a link couple of links in the description maybe some discounts there and uh whilst we're talking about discounts if you are a YouTube member I usually have quite a lot of substantial discounts just for YouTube members again I like that interaction with some of the students on the membership now if you're one of my people who likes to have 4 500 tabs open in your browser what are you doing what are you doing the web browsers today they can use up a huge amount of system resources and that is something that really can slow things down inside of uh uh inside of C UI and stable diffusion the problem there is that the web browsers the tabs in the web browsers can use up individually a huge amount of GPU memory they can use up other resources uh some of these tabs can use up more memory than a computer an entire computer from 15 20 years ago one of the things I like to do is to use a uh a an extension called one t and one t allows you to just basically collapse everything in a in an open browser window to a single window which is going to be made up of different bookmarks so we would have one bookmark for this tab another bookmark for that tab the tabs themselves close they immediately release system resources and you can then open up the tabs all of them at the same time using one tap Now One Tap is here in bing you should be able to find it as well inside of uh Chrome and inside a Firefox now compy UI is very intelligent and every time it starts up it measures your system resources and tries to adjust its settings to ensure that you get the best performance possible this means for instance uh that it may adjust settings to enable you to work with a low uh Graphics power system so if you have uh 3 GB graphics card it will adjust the settings to try to make everything work but you can also adjust the settings yourself if you want to for instance we can adjust some of the settings here two settings to be aware of is low vram this is used for low vram computers the 3 GB 4 GB systems add this Das Das low vram and it will work with that low vram it will constrain the behavior it might actually run faster than other way way of accommodating for low vram so low vram a useful one you might be using it inside of uh automatic 1111 it should automatically encom UI when you start up figure out whether you need it or not and adjust accordingly another feature is disabled smart memory and you just basically put these commands in as arguments after this line here as I've done here hopefully you can see everything and how is all arranged now disable smart memory just changes the default behavior of the system smart memory was something added in Windows and it changes the behavior makes the way the system behaves sometimes more aggressive in how much uh G vram it uses so disable smart memory might reduce the amount of vram being used by your system and it might allow you to run jobs that as otherwise too demanding particularly useful if you're running sdxl default is medium V Ram but there is another condition that we can uh apply if you if you want to BU RTX 4090 brothers and sisters the RTX 3090 the the the really powerful systems with lots and lots of vram there's another condition save the file and then restart comy UI high vram is for the people who have got really powerful gpus it opens up the possibility that your GPU can use all of the vram that it's got to maximum advantage now we also have a hardware solution which involves getting a more powerful graphics card typically with at least 16 GB if you're using sdxl you want 16 GB of vram at least you know it will work with eight and less but that's getting the hardware that will improve the performance of your system give you a little bit if you go for the aex 490 it will give you a bit of Headroom for uh future proofing making sure that you have a system that can run when the even more powerful models come out however links to some recommended uh Graphics processors if you want to try those out I I got to tell you some of the prices have started to edge up a little bit which is H interesting but uh yeah hopefully you'll find some decent prices but guys those are different techniques for improving the performance of comfy UI and I'm going to have the comments open for the video hopefully if any problems someone will be able to help you out if you just leave a comment guys that's it for this one the one
Info
Channel: Pixovert
Views: 1,940
Rating: undefined out of 5
Keywords: stable diffusion lowvram, stable diffusion gpu memory, stable diffusion graphics cards, comfyui performance improvement, lowvram, highvram, comfyui medvram
Id: FTs5kBjEJpw
Channel Id: undefined
Length: 9min 4sec (544 seconds)
Published: Thu Oct 26 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.