How to Easily Install ComfyUI on Mac OS (M1, M2 or M3)
Hey, this is a slightly different video to normal and I just wanted to share the process to be able to install ComfyUI on an M1 or M2-powered Mac. I've just been through the process, and there are a few hurdles to set up so you can make use of the amazing ComfyUI and all the power and customization it has available. You can create your custom workflows to make use of stable diffusion and all the different things out there to bring images and animation to life using AI. So, I'm just going to quickly run through the steps to show you how you can set up ComfyUI and start learning the platform. Here we go:
Step 1: Creating an AI Folder
To start off with, on your Mac, open up a finder window and in the home directory, create a new folder called "AI." This is where we're going to be setting up our ComfyUI stable diffusion and adding any future models and assets. This will serve as the base folder for any stable diffusion activity in the future. It's just a normal folder.
Step 2: Open Terminal
Open Terminal on your Mac, which you can find in the utilities folder in your applications. Terminal allows you to interact with the core of your computer, run scripts, navigate folders, and make changes. It's crucial for running AI tools, particularly like stable diffusion. The equivalent of Terminal for Windows or Linux exists, but this is the Mac version.
Step 3: Navigating with Terminal
In Terminal, you can use a few short codes to navigate around folders and files. Here are some examples:
PWD- Lists the current locationLS- Lists folders within the current folderCD /- Moves to the root of your computerCD [foldername]- Moves to a specific folder
Step 4: Install Homebrew
Before installing various scripts to get ComfyUI up and running, you need to have Homebrew installed on your Mac. Homebrew is a handy tool that allows you to install other scripts and code on your computer. You can install it by following these steps:
- Head to the brew.sh website.
- Copy the provided code.
- Paste the code in Terminal and press enter.
- Enter your password when prompted.
- Press enter again to complete the installation.
- Check if Homebrew is working by entering the command
brew doctorin Terminal. If it's working, your system is ready to brew.
Step 5: Install Python 3.11
To work with ComfyUI, you need to install Python version 3.11. Follow these steps:
- Check the current version of Python on your computer by entering
python3 --versionin Terminal. - If you have a version older than 3.11, use Homebrew to install Python 3.11 by typing
brew install python@3.11in Terminal and press enter.
Step 6: Install Pip and PyTorch
To fully utilize ComfyUI, you also need to install pip and PyTorch. Here's how:
- To install or upgrade pip, enter
pip3 install --upgrade pip setuptoolsin Terminal. - To install PyTorch, enter the following command in Terminal:
pip3 install torch torchvision torchaudio --pre -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html(CPU only)pip3 install torch torchvision torchaudio --pre -f https://download.pytorch.org/whl/nightly/cu111/torch_nightly.html(GPU with CUDA 11.1)
Step 7: Clone the ComfyUI Repository
Now, let's clone the ComfyUI repository into your AI folder:
- In Terminal, navigate to your AI folder using the
CDcommand. - Enter the following command to clone the ComfyUI repository:
git clone https://github.com/comfyui/ComfyUI.git
Step 8: Install Required Dependencies
Next, we need to install the dependencies required by ComfyUI:
- Navigate into the ComfyUI directory using
CD ComfyUI. - Run the following command to install the requirements:
pip3 install -r requirements.txt
Step 9: Run ComfyUI
Finally, let's run ComfyUI and access it in your browser:
- In Terminal, make sure you are inside the ComfyUI directory.
- Enter the command
python3 main.pyto start ComfyUI. - Copy the provided URL and paste it in your browser.
- You can now start exploring ComfyUI and learning how to create AI-driven imagery and animations using stable diffusion.
Conclusion
That's it! You've successfully installed ComfyUI on your Mac OS-powered computer. By following these steps, you can now take advantage of the powerful and customizable features that ComfyUI offers. Don't hesitate to try out different workflows and unleash your creativity with AI-generated images and animations using stable diffusion. If you encounter any issues, feel free to seek help from online communities or forums dedicated to AI and ComfyUI.
Frequently Asked Questions
-
1. What is ComfyUI?
ComfyUI is a powerful platform that allows users to create custom workflows for generating AI-driven images and animations using stable diffusion. It offers a range of features and customization options to bring your creative visions to life.
-
2. Can I install ComfyUI on Windows or Linux?
While the steps mentioned in this article are specific to Mac OS, ComfyUI can also be installed on Windows and Linux systems. However, the installation process may vary slightly. It's recommended to refer to the official ComfyUI documentation for detailed instructions.
-
3. Are there any hardware requirements for running ComfyUI?
ComfyUI can be run on various hardware configurations, including the latest Mac computers powered by M1 and M2 chips. However, it's always recommended to check the specific system requirements mentioned on the ComfyUI website to ensure optimal performance.
-
4. Can I use ComfyUI for commercial projects?
Yes, you can use ComfyUI for commercial projects. However, it's essential to review the licensing and terms of use provided by the ComfyUI team. Make sure to comply with any restrictions or guidelines mentioned to ensure proper usage.
-
5. Where can I find additional resources or tutorials for ComfyUI?
If you're looking for more resources or tutorials to enhance your skills with ComfyUI, you can visit the official ComfyUI website, join the ComfyUI community forums, or explore online tutorials and forums dedicated to AI and creative workflows. These platforms can provide valuable insights and guidance for creating amazing AI-driven content with ComfyUI.




