ComfyUI Local Install and ComfyUI Manager On Apple Silicon M1/M2/M3 Mac Full Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what is going on ladies and gentlemen it's your boy chuku bum and I am here to talk to you about how we're going to get comfy UI installed on Mac and why would you need comfy UI installed on Mac well first off it's a much better AI image generation software than automatic 1111 for Mac it's a very robust and probably the best image generation software for Mac as of right now you have way more control over the types of images that get created and allows for even more options when it comes to image generation let alone stable video diffusion which you can expect a video on very soon plus so many other options for you that make it way better than just using automatic 1111 or you know maybe mid Journey or whatever the case and it'll be right here on your Mac it's just a win-win and although it can seem a little daunting at first it's actually very simple to use and in the long term way better to get to learn than even automatic 1111 would be so let's just hop right into this and get started the setup is going to be very similar to what we did with automatic 1111 for Mac with stable diffusion you're going to need Homebrew and you're going to need python so first we need to download home brew so we're going to go to brew. sh boom now you're at home brew and then what's going to happen is you're going to take this right here you could just click this little copy button right here you're going to take this copy button and you're going to head to your terminal if you don't know how to head to your terminal you can click f4 on your Mac and then you can type terminal and then you'll get over there very quickly and all you're going to do you're just going to command V your this bad boy you're going to paste it right into here now I already have Homebrew so it's pretty much just going to stay installed but um you're just going to run it and then you're going to say checking for pseudo access D so you're going to put in your laptop's password it says this script will install and then you press enter that's perfectly fine now like I said I already have it so it's going to just update everything pretty much installation was successful and all it did was update two tabs but for you it would be a whole thing like it would be like and then if you want to make sure that you have home brew you would just type Brew doctor after you type in Brew doctor and then it'll let you know if you have home brew so he says your system is ready to brew so that's cool that even they have a nice sense of humor because you know Brewing brewing a beer a brew you get it now that we've installed Brew it's time to install python now you could install python alone that would be perfectly fine and you would be able to get comfy UI up and running with the next steps that we provide but I want to give you guys a little bit extra because you may also in the long run want automatic 1111 so what I'm actually going to recommend to you guys is that you come over to this website right here the link will be in the description below and what you're going to do you're going to do Brew install cmake protuff rust and python U see this python is 3.10 you could always do 3.11 that's the newest python that's the newest stable python version and then you know um Brew install git and Brew install w G now these are all things that actually will give you the ability to run automatic 1111 rather than just installing Python and then all you can do is comfy UI so I'm definitely trying to give you a little bit more than what you would normally get but if this is a little bit Overkill you could just get rid of everything here and just do Brew install python at 3.10 or 3.11 or you could just leave the threes alone and just Brew install Python and you would get Python and you could still continue on with this tutorial but I definitely do recommend that you take this whole thing right here so I'm going to take this whole thing and just to show you what I mean when I say that you can always just get rid of the rest right if you want you could literally just do Brew install python if you run this that'll be perfectly fine in fact I'll do it really quickly if we do Brew install python see I already have python so it's going to say python 3.11 more specifically 3.1.6 one is already installed and up todate so I don't need to install anything it's asking me if I would want to reinstall I don't need to do that but you could run that and you'd be good to go but me I'm going to run the whole thing just to show you guys again Brew install cmake Proto and everything else because again just python will work for comfy UI but if you install everything else you'll also be able to use automatic 1111 if you ever decide to have that so I always like to say better to have and not need than to need and not have so we're going to run this again Brew install C make Proto above everything and again I already have everything so it's just going to be you know reinstall reinstall reinstall but you guys would get like this long list of stuff that's what you guys would get and then you'd be good to go so now that you've installed python along with other things now it's time to install pytorch and pytorch well look at it right here pytorch is a fully featured framework for building deep learning models basically meaning that this is what helps create chat gbt stable diffusion mid Journey claw Bing AI all these different AIS that we're getting more and more used to seeing on a daily basis it's built a lot by using py P torch and so we need pytorch on our Mac in order to get comfy UI up and running now in order to get pytorch you're going to come here to py torch. org get started SL locally you're going to come over here and you're going to click preview nightly that's the type of pie torch that we need that's going to run on Mac so now we have preview nightly again the OS is Mac the package is PIP um the language will be Python and the compute platform will be default I mean it's pretty much already selected for you the only thing that you got to change is nightly and then once you have this you're going to make sure that you're going to uh take this right you're going to take this code right here copy it however you'd like and you're going to come into this terminal after you've run everything and you're going to put pyour just like that and it's going to run okay now again I have it already I don't know I'm G that's there going to be a theme in this video I already have that so it says already already installed already satisfied um you guys would get something different you get you guys would get like a whole bunch of loading things and everything like that but with me I'm getting already satisfied so now we have Brew Python and pytorch so we're just about ready to get the ball rolling now that we have everything that we need we're going to install com fui onto our MacBook and unlike trying to install com fui on a Windows where you would have to get clone comfy UI onto your windows and then use a seven zip extractor to get it out and do all this stuff with U Mac it's actually really simple what you're going to do you're just going to copy this git clone right here and you're going to pretty much CD into whichever directory that you want to be in so right now by default in my terminal I'm in the root of my Mac so you can see you could tell that by this little sign right here this little like curvy sign I forgot what that's called but if you want to know where you are in your Mac all you do is type PWD and it'll show you I'm in the users chukua directory right but what's in that directory all you would do is type LS and it will list everything that's in that directory now me personally I'm going to clone comfi onto my desktop you can do do it into your downloads you can do it into your documents folder you can do whatever you'd like but I personally love to put things on my desktop because it's just easy access quick access so I'm going to now move into that directory by typing in CD and then desktop boom now I'm in desktop and again you can always check by doing PWD and it says it right there users chub Maga desktop so now we're going to get clone comei onto our desktop and all you have to do is command V now if you want to make it more sturdy people would probably get clone comi into another folder because sometimes you may want like all your AI stuff in one folder like let's say automatic 11 comfy UI all within an AI image generation folder but for now I want to keep it simple and just come and just clone it right there onto my desktop so now that we have it in our terminal we're in our desktop we're going to say get clone we're going to press enter and it's going to start cloning in and it's pretty quick and you could tell that it's there now because you'll see comfy UI right here now that we have comfy UI installed we're going to need to run one more command but before we do that I do want to show you guys what the comfy UI would look like so again if you open the comfy UI folder you're going to see all these things and this might say look a little daunting at first but they all mean something and it's not that hard I I'll teach you guys and we'll walk through it but before we go through all this there is one command that needs to be run and I'm not going to lie I actually had a hard time once I got to this part of the installation process and I would have to shout out AI animation they really helped me with a lot of this stuff right here AI animation great YouTube channel talks about all types of AI stuff and um they actually literally they they actually pretty much solved the issue here there weren't a lot of there wasn't a lot of info about how to get past this part or at least get past this part correctly and these guys really help me figure that out so this this video probably wouldn't even be possible as soon as it's being made if not for AI animation so definitely go show them some love I got to really appreciate them but now because of them we have the next step and we're going to get even deeper like I said now we have com fui here on our desktop so now we need a CD into desktop so we're going to CD into desktop great we've cded into desktop and what's funny is that as we're moving through each folder path you'll see this top part change it'll change into wherever you are so that's a good way of knowing where you are along with the PWD command so now we're going to uh CD into comfy UI you don't have to worry about capitalization or anything it'll automatically just go straight into that one so CD into comi but again if you never know it says it right here comi and you see how I didn't have to worry about capitalization uh Capital C Capital UI it's it's the same exact thing there and again if you ever want to know where you are PWD and you'll find it right there and you know one more tip and trick if you type in CD Dash it'll take you back into the previous directory so now I'm back in the desktop directory and you can see that at at the top right here uh reflecting that chain but we're going to go back into com fui and we have to run this command pip 3 install dasr requirements. text now what does this command do well if you go back into this comfy UI folder you'll actually see it right here requirements. text and if you open that up it'll show you what is actually needed to run comfy UI and basically all that is going to do is that once you run that command it's going to run that script to get what's needed for comfy UI so again we're just going to ex out out of that and we're going to run the command simple as that so you see now again like I said I've run this all before so you're going to I'm getting requirement already satisfied um but because it's already on my Mac but some but you guys would get like long loading things and everything like that but it's still not that long usually takes about a minute or two so now we have comfy UI on our laptop Mac whatever and let's run it while still being in this directory you're going to type in Python on 3 main.py okay now that that's just activating this file right here that actually runs comfyi so once you press enter on this command it's going to activate comfyi it's going to take a little bit of time but it's going to activate comfi and once comfyi is activated you're going to take this HTTP address right here you're going to copy that bad boy you're going to paste that bad boy right here and boom you have comfyi ready to go oh actually not really you don't have comfy UI ready to go because you actually don't have any models to use so look if you click right here you need to load a checkpoint a Model A Safe tensor you need this in order for it to work and as you can see right now it says undefined so if I try to queue a prompt it will not work it'll actually give me prompt outputs failed validation so we need to go get a model now when it comes to models different models will actually require different levels of vram so I'm actually going to get like a nice chill model so that we can run this very fast and very effectively so the model we're going to download for this one is a very chill very usable stable diffusion v15 model um obviously there are much better models but it's it's just a nice stable model that typically does not give a hard time and it's still very fast to use across all systems and we're going to download the v15 pruned emo only safe tensors be very wary about downloading models with checkpoints checkpoints are pretty much safe tensors they're pretty much the same thing it's just that checkpoints can carry malicious viruses it can C it can carry malware and you really do not want that so you want to take the safe tensor route normally and yeah you would just take that and you're going to download it it'll take some time a couple of minutes and once it's downloaded I'll show you what to do next awesome so now that it's downloaded what's going to happen is that we're going to open two finder windows or you can open one I mean you can kind of do however you want but here we have the down downloads folder right you you're going to navigate to where the downloads folder is on one of them and you can see where we have it v15 pruned Emil only save tensors right now I need you to navigate to your comfy UI folder and then in that folder you're going to get into the models folder and in that model folder you're going to get into the checkpoints folder and right here you're going to say put checkpoints here now again just to clear up any confusion a checkpoint and a model and a save tensor are all the same they're just templates that stable diffusion uses to base the images that you're generating off of it can get much deeper than that but that's basically what it is and you're just going to move this this into that there you have it so now we have it in our checkpoints okay great now you're going to come back to where comfy UI is now you're going to need to refresh this so you could this is literally a web page so you could literally um you know command R and refresh it or you could click refresh here perfectly fine either way that you want to do it and now you'll see that v15 uh prune EMA only save tensors is in there so now we finally have a model and we have our prompt beautiful scenery nature glass bottle landscape purple Galaxy bottle and then we have our negative prompt which is text Watermark now just to show you a little bit of how this works well actually before I get into how this works let's actually run the prompt now that we've run the prompt a few things that you can know is that if you you can always just grab the screen and move it around um on your MacBook using your trackpad you just you know scroll up and down to zoom up and down comfyi typically much faster than if you were to use automatic 1111 but still know that Mac in general when it comes to stable diffusion is a lot slower than a good PC so there's still a ways to go when it comes to stable diffusion on Mac but using com fyuui will on average be a lot faster than trying automatic 11-11 and look wow look at that look at what we got you know look we got this nice little thing and boom now you've generated your first ever image so this is really great um you don't have to just scroll in like that you can also click on this and then extend the image like so now we have our first ever image but there's a few things that you need to know about comfi so this is going to turn into a little bit of a crash course so first and foremost this is where you load in your checkpoint and your model from your checkpoint and your model you have to connect it to a prompt a positive prompt and a negative prompt and you connect it using these noodles so all you have to do is take this little dot you would click it and then you would connect it to here or connect it to there and stuff like that and that's basically what happens with the clip the clip connects to the positive and the negative prompt and then the positive and the negative prompt they connect well well technically speaking neither of these prompts are actually positive or negative they're not determined until these prompts are connected to the positive and negative sources in this sampler so you take this and it would connect to negative and you would take that and connect to positive so you can actually literally see this I can actually disconnect it so you see I just disconnected it so now again they're just prompts you don't they don't mean anything until you finally connect it to a positive or negative and you can connect the bottom to positive or the bottom to negative it doesn't really matter just obviously for organizational purposes negative is on the bottom positive is on top then you have the model now the model ption portion of this connects to the sampler itself and the sampler is what runs your image generation the sampler is what kind of creates the code and the process that creates the image that we're seeing over here right that's what the sampler does and it has a lot of different settings to it that oh we need not go into right now but the sampler has a lot of different settings and the more that you adjust these settings the more that you get and then you also have this latent image and all this does is determine the size of the image so if I change this from you know uh 10 to 1080 you know 1080 by 1080 you would get a much bigger picture of course but we're not going to do that either right now and then this connect to the decode and the decode is what takes all the information and make and packages it nicely to create the image and place it right here so that's kind of what this whole process is and it's a set of noodles and all these are called nodes by the way so they're different nodes this is a checkpoint node a prompt node a sampler node but they're all nodes just for you to know and com fui can get way more Swifty but in order for it to get more shwifty you're going to need one more thing which is the comfy UI manager that helps organize this whole stuff and add much more to this and make this a much more robust program than what we're seeing right now so let's get into that so you're going to come over to this link and again everything in the video will be linked down below the way that we're going to do it there's a couple ways to do it um but I like this way the most cuz again when you learn the terminal it's even better um what happen is that you're going to CD into custom nodes so we're going to actually show you another nice way to do this see custom nodes let me show you where custom nodes is custom nodes is just another folder in your comfy UI directory so you got to get into custom nodes right now the thing is that in order to get into custom nodes yes you could do the CD into CD into CD to get there but what you could do also is that you can go to this terminal right now what we're going to do actually we're going to open up a new terminal window just open up a new window and what's going to happen now you could now again you could actually close the com UI if you want but I'm just going to leave it running and we're going to open up a new window and what's going to happen is that we're going to type CD so we're going to change directory that's what CD stands for change directory and you're going to drag custom nodes in here and it's actually going to copy the path file so um or rather the path name and then you just click enter and now you have cded into custom nodes and again you can see it right here custom nodes is right here and you're going is going to go back to the link and you're going to take this whole thing get clone you're going to get this whole thing get clone HTTP GitHub and then now that you're in here you're going to get clone it into custom nose that folder and you see it's going to clone comfy UI into it so remember we still have comfy UI running so now that we've cloned The Comfy UI manager into comfy UI you are going to need to stop the comfy UI software from running and then restart it so in order to do that all you got to do is just X Out the terminal that is running in pretty simple you just exit out and that will terminate comfy UI like as you can see right here you'll see that it now turns into into reconnecting because the terminal is no is no longer running so we just got to make our way back into the comfyi folder so you again you can use the same method CD into comy UI like I just did I dragged and dropped it over there and then we're going to do Python 3 main.py again and it's going to start running everything up just like normal and you're going to take that link and you can you can actually highlight this then double click it and then um open link and it'll just open default into the same same thing and then boom now you're going to see something different you're going to see manager and now we're cooking with oil cuz check this out now that you have the comf UI manager there's going to be a lot of things that you can do so first off you can install models so you see how we were taking models before we had to go to hugging face or civid AI in order to get models you don't need to do that anymore at least for some models and some nodes and some ups scalers and things of that nature you can literally just download them into comfy UI and them from there so for example right let's close this for a second as you can see let's close this as you can see we only have one model to use v15 pruned okay great when you go into manager and you click install models right there are different types here there's upscale models that's for making the the the face better there's face restore models that help to rebuild the face if the AI gets it wrong and so on and so forth and then there are checkpoint points this one is for stable diffusion video models which we will get into um on another video but then there are some St some regular ones like checkpoints that you can use like sdxl turbo there's also control net there's a lot of things that you can do here but for now we're actually going to keep it very very simple we're going to download just another version of a model so check this out all you would have to do let's see sdxl turbo we would install that and if you want to learn how to use sdxl turbo which allows for realtime image generation you can actually go check out this video here where I talk about it and set it up with you so it's pretty big stuff and by the way if you're liking the video so far and I've been able to help you please remember to like And subscribe it takes this channel to a whole another level and I'd really appreciate it thank you so now you can see that it's installing sdxl turbo one it'll take some time but once it's installed it'll just say installed and then we can move forward and you'll see it right there in the model checkpoint and boom now it's installed to apply the installed model please click the refresh button on the main menu so we're just going to click close then we're going to again and close this we're going to click refresh now that it's been refreshed if you click on this you see sdxl turbo and we could change it but we're not going to use that right now we're going to stick with the uh v15 safe tensors so that's how you're now able to install models into your system another cool thing that you could do when it comes to comfy UI you can bring images that were created in comfy UI into your own comf UI and it will literally show the workflow that made that so I'm going to show you right now with one of the images that I made a while back ago so here I have an attractive black woman that I had made and so if I drag and drop this into the UI you see that it just changed the whole workflow you can literally see what I did to create the black woman you'll see that it used what I created to make the prompt you'll see that uh it had dream Shapers which I don't have right now this is a different comy UI um you see that I also had used an upscaler and up I had used a couple ups scalers and stuff now if I cue The Prompt it won't work because look see prompt outputs validation you know the checkpoint loader it doesn't have that checkpoint and so on and so forth so as a result it can't use it I'll need to download these things now the beautiful thing is that it shows you what you need to download so I would just need to get the dream shaper safe tensors and says value not en list model name forx anime. paath so I would need to get this as well and then you know once you're able to get those you would be able to move forward so that's the beauty of it you can bring an image that was made in comfi into your own comfyi so that you can see the workflow that was used to create that same exact image and try to replicate it yourself which is very powerful when you're trying to have as much control as possible over the images that you're trying to create another thing about the comfy UI manager is that whenever you want to update comfy UI itself you can literally just say update com UI or update all meaning that you would update the nodes the models everything which can also help you out a lot you can also install missing custom nodes basically meaning that whenever you do take someone's workflow and it has all types of nodes um that you don't have you can install it doing that way and if you already have automatic 1111 here's a nice cool tip that you could use instead of R downloading every model from hugging face or civid AI if you already have a folder where you keep all of your models you can redirect the path of comfy UI that looks for models to another folder and this is how you would do it you see how in comfy UI there's this thing called extra modore paths. yl. example what you're going to do is that you're going to rename this file rename it and you're just going to get rid of the example part so get rid of example press enter and then it says use. yo now that you've renamed it you're going to need to open this up in a text editor now I don't know what your default text editor is but for many of us we could really just use um text edit that comes with Mac if not text edit maybe notes or whatever but you know and there's all types of text editors you can use brackets Visual Studio code you can see I even have X code by default but we're just going to use text edit for now and what happens is if you already have automatic 1111 you can actually go you can actually set the path to wherever you're keeping your models in that folder so let me show you what I mean by that as you can see where I keep my automatic 1111 is in my home directory and then you would go to stable diffusion D webui then you would scroll down and I would go to models and then boom I would go to stable diffusion and here are all my models right but you're not going to actually give it that whole path what you're going to do you're just going to come to where you have stable diffusion D webui and you're going to right click on this and then you're going to hold down option and then you're going to see copy stable Das diffusion webui as path name and you're going to click that okay then you're going to come over here where it says base path you're going to remove this and you're going to copy the path that's there great then you're going to save file save boom now the extra models path is saved now that you've changed the path you will have to restart comfy UI so again you're just going to come over here you're going to ex out this bad boy pretty simple stuff then you're going to open up another terminal you're going to CD your way into that folder but you can literally just drag this folder into there and then boom now you've cded your way in and you're going to do Python 3 main.py and it's going to start it up again like normal you're going to head over over to that link open link and now when you when you look it up boom you see all the models that I already had in my automatic 1111 can now be used here so let's try out dream shaper right this is where we had the dream shaper remember we didn't have the dream shaper before so now that we have the dream shaper now the only thing that we don't have is this upscale model but we could just delete those for a little bit right now let's delete those and we're just going to put the image here and let's see what dream Shapers gives us and the beautiful thing is that while you're waiting on this if you look in the terminal you can actually see the percentage you can also see it here about what's loading up um you know the green bar is also showing you what's loading up but if you want to see a more specific version it says 65% 70% in the terminal itself so that's always cool to know to see how long it's taking for you and then it's going to go into the decoder and again you know it's loading one new model and everything and in a few seconds we should have it ooh not bad definitely leave a like definitely subscribe your boy Chelli just made his wife like this is not bad this is not bad now of course you could always take this to another level right add some upscaler add some different you know um features that you would want with this but here we have it here we have it this is what kyui is able to create and it's in our control and that's the Beauty and it wasn't that hard now was it now again if you have a M2 or an M3 MacBook the generation will be a little faster especially if you have like a M3 Max and things like that the generation will be faster but um this is comfi in a nutshell there are definitely some comfi resources that you can use you see comfyi examples it shows you like you know image to image what that would look like and how you would go through it hyper networks all that types of stuff it's pretty impressive stuff um there's also the GitHub the GitHub also shows you a lot of what you can do here and also redddit as you can see here a few examples of my comfyi look at them look at this and you know this you know Reddit is always a budding Community for anyone who's trying to learn anything right we already know this so you have Reddit there's definitely a lot of things that you can look at um but yeah you know there's a lot going on here you look a beginner's guide to come for UI I personally like this website a lot stable diffusion dart.com um a link will be in the description really good website it kind of gets you up to date and kind of gets the ball rolling for a lot of AI image generation oh and you know what here's also also the settings shows you a little a lot of different settings I personally you don't really need to mess around too much with these settings but there's definitely a lot of things in the settings that you could look over like um it does show you different colors that you could use so if you use solariz and things like that or Nord you know there's definitely different colors me personally I just use dark by default and there's definitely other things here you can always play around with this stuff but for the most part um not not much that's really going to change anything and um there's definitely other stuff here but that is the bulk of com fui for Mac I genuinely appreciate you guys for watching please stay tuned for more videos about com fui sdxl stable diffusion AI in general if you really appreciate it remember to like And subscribe I will appreciate that in return and please have a great day chuku buam Chelli out
Info
Channel: Chukwubuikem Oguagha
Views: 1,097
Rating: undefined out of 5
Keywords: AI, AI Image Generation, ComfyUI, ComfyUI Manager, AI Technology, Install ComfyUI, Image Generation, Artificial Intelligence, ChatGPT, ChatGPT4, MidJourney, Stable Diffusion, ControlNet, AI Tools
Id: R4OjXE6LKXY
Channel Id: undefined
Length: 29min 44sec (1784 seconds)
Published: Fri Dec 08 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.