Skip to main content
  1. projects/

Installing ComfyUI on macOS M2

AIMG Projects AI Software and Tools Tutorials and Guides Virtualization
Timothy Smith
Head of Infrastructure
Table of Contents


If you’ve recently acquired an M2 Mac and you’re eager to explore ComfyUI, you’re in the right place. ComfyUI offers a seamless user interface experience, and setting it up on your M2 Mac is a straightforward process. Let’s dive into the steps required to get ComfyUI up and running on your system.

Setting Up the Environment

Firstly, let’s create a directory where ComfyUI will reside. You can name this directory anything you like, but for clarity, let’s call it AI.

mkdir AI
cd AI

Next, let’s install Homebrew, a powerful package manager tailored for macOS. Visit the official Homebrew website to learn more about its features and benefits.

Visit Homebrew
/bin/bash -c "$(curl -fsSL"

After Homebrew is installed we now need to install python3.11. We can check for current version first then if it is not installed we can install it:

python3 --version
brew install [email protected]

Now that Python3.11 is install we need to upgrade pip and setuptools

pip3 install --upgrade pip setuptools

Installing PyTorch

PyTorch is a crucial library for machine learning tasks, and we’ll need it for ComfyUI. Visit to get the installation command. After visiting the link, execute the following command:

pip3 install --pre torch torchvision torchaudio --index-url

Cloning and Installing ComfyUI

Now that we have the necessary dependencies set up, let’s clone the ComfyUI repository into our AI directory.

git clone
cd ComfyUI

Install the required dependencies for ComfyUI.

pip3 install -r requirements.txt

Running ComfyUI

To run ComfyUI, navigate to the directory where it’s located.

cd ../ComfyUI

Execute the following command to start ComfyUI.

to view ComfyUI click the link that looks similar to this:

Exiting ComfyUI

To exit ComfyUI at any time, you can press either CTRL+C or CMD+C in your terminal window.

Restarting ComfyUI

If you restart your computer, you’ll need to navigate back to the directory where ComfyUI is installed and rerun the command to start it.

That’s it! You’ve successfully installed and set up ComfyUI on your M2 Mac. Enjoy exploring its features and capabilities.


Navigating Docker with Ease
Kasm Projects AIMG Projects Personal Projects Networking and Servers Software and Tools Tutorials and Guides Virtualization
Homer the Best Homelab Dashboard
AIMG Projects Personal Projects Software and Tools Tutorials and Guides Virtualization Web Development
TwinGate the Easiest VPN Out There
AIMG Projects Personal Projects Networking and Servers Software and Tools Tutorials and Guides Virtualization