Effortless Installation of Comfy UI on PC (Windows/Mac/Linux)

install Comfy UI on Windows/Mac/Linux

Whether you are a Windows, Mac, or Linux user, we will help you to install ComfyUI on your PC. ComfyUI is the Web User Interface for running Stable Diffusion which can be managed locally or remotely on any machine. After releasing of this WebUI, it gained huge popularity amongst AI Artists. 

Well, ComfyUI gives you a flow-to-model architecture that helps us to understand how the different modules (nodes) are connected with one another which is beginner-friendly. In simple words, it’s easy to understand.

Apart from this, we have a detailed understanding of various ComfyUI nodes which will give you a clear picture of each function.

Let’s directly jump into the installation part.

Install ComfyUI on Windows :

The ComfyUI Standalone Portable Windows (For NVIDIA GPU) is the best way to download and setup with just a click. Using this method, you create a separate virtual directory which will not generate any installation conflict in the future.
git installation on windows
1. First download and install Git by navigating to its official page.
Download Python

Add path to environment variable

2. Download Python 3.10.6 version and add the environment path by checking the option while installing.
download zip extraction software
3. You need to have 7ZIP or WinRar (Zip Extraction software)for extracting the compressed files. We have installed 7ZIP.
4. Now, download ComfyUI by going to official download link provided below:
After downloading choose any drive where you want to store ComfyUI in your local machine and move the downloaded file. 
Then use 7ZIP or WinRAR software to extract the files. To do this, simply the right click on the zipped downloaded file and select your zip extraction software.
Run ComfyUI

7. After installation, go to the installed folder where you have installed the ComfyUI folder select the “run_nvidia_gpu.bat” file to run ComfyUI into your web browser.

Download ComfyUI Manager

8. Now, you also need to install ComfyUI Manager that will help you in installing and managing custom nodes. To install this, download the batch file and save into installed “ComfyUI_windows_portable” folder.

start comfyui

Now, click the downloaded “install-manager-for-portable-version” batch file to start the installation. Now Restart your ComfyUI to take effect. Enjoy the image generation.

Downloading models and checkpoints:

hugging face

Civit ai

1. Now, we have to download any standard Stable Diffusion models either from CivitAi or Hugging Face for image generation.

There are multiple Stable Diffusion Models you can try :

  • Install Stable Cascade (Text-to-Image model)
  • Install Stable Diffusion 3 (Text-to-Image model)
  • Install Stable Video Diffusion (Image-to-Video model)
  • Installing AnimateDiff with SDXL (Image-to-Animation model)
  • Installing AnimateDiff with SD1.5 (Image-to-Animation model)

2. All the models usually goes into the “ComfyUI/models/checkpoints” folder.

ComfyUI installed

4. Enjoy and start your image art generation with ComfyUI.

Install Comfy UI on Mac:

1. First, download and install GIT by navigating to its official page

2. Now, to download the Comfy UI from the Github repo you need to go to the link:

https://github.com/comfyanonymous/ComfyUI

Now just open your terminal and use the “git clone https://github.com/comfyanonymous/ComfyUI.git” command to download from the Git repository or you can directly click on the “Code” button and then again click on “Download Zip” to download it.

3. After downloading it, just extract the folder using the 7Zip or WinRar application into whatever folder you want to keep in the files. 

 Keep patience if it takes time to download because the model is very larger in size.

4. Create an installation folder where the
Comfy UI files are stored. In our case, we made a new folder named “
AI”.

5.  Now, open your terminal of Mac by pressing the shortcut key:  Command + Space Bar and
type terminal.


6.   Type into the terminal:   cd press once space, then drag and drop the created folder into your terminal
like we have shown in the above image. This will just add the path to your created
folder.


7. Now, we have to install an application named “Homebrew”. This is the package manager that helps
the users to install and run open-source software. Install it by going to
their
official page.

mac terminal for comfyui install

8. Just copy the code for installation by
clicking the COPY button. Move back
to your terminal paste the code and press Enter. If it requests for a password just type your own Mac password and
press Enter (twice). This installs
all required dependencies like pip, python, etc.

mac terminal for comfyui install

9. Now, type brew doctor and press Enter.

If this gives you some error, you will see a
Warning message just follow the steps and just copy and paste that command and
press Enter.

 Again
type brew doctor and you will get
the message that Your system is ready to
brew
.  

10.  Now to check what Python version has got, type 

python3 –version 

and press Enter.  If you want to upgrade the Python version if
Comfy UI is not supported then type

brew
install
[email protected]

Here, in our case, we are installing Python
3.11 which is the latest version. Place the latest version in place of 3.11 to get
the new version installed.

If you are getting error for python version not supported then its recommended to install Python 3.10.6

Now, install PIP as well. Type this command and press enter :

pip3
install –upgrade pip setuptools

install pytorch

Now, install Pytorch. Go to pytorch official page copy the code for installation and paste it into Terminal and press Enter. At last, we have successfully installed all
the dependencies to run ComfyUI.  

11. Now, just open your terminal and type:

git clone https://github.com/comfyanonymous/ComfyUI.git

This command helps to download from the Git repository or there is an alternative method as well. You can directly go to their repo click on the “Code” button then again click on “Download Zip” to download it.

12.  All the files have been downloaded to our
newly created folder “AI”. Type on terminal:

cd and
drag and drop the ComfyUI folder to the terminal. This copies the file path to
the terminal. Press Enter. 

drag and drop ComfyUI folder

Again type

pip3
install -r requirements.txt

This will download and install all the
libraries and files.

ComfyUI installed on Mac

Now you can open the Comfy UI application which runs stable diffusion by typing:

  python3 main.py

 A
new URL will be provided called a local host (Starts from https://127.0.0.1……). Just copy and paste on into your browser, and ComfyUi will
be opened to your browser. 

If you have turned off the Mac and want to open ComfY UI then just move into the ComfyUI home directory, open your terminal into that folder and type “python3 main.py” and you will get the dashboard in just a few seconds.

Now, the first time you run the default workflow you will get an error. Make sure you have already set all the
settings of the basic Stable diffusion model from Hugging Face and set all the
checkpoints/models (the huge ckpt/safetensors files) in the folder destination:

ComfyUImodelscheckpoints

There are multiple Stable Diffusion Models we have which you can follow:

Install Stable Cascade

Install Stable Diffusion 3

 

Install Comfy UI on Linux:

1. Make sure you have installed the Git installed on your computer. If not, then you can go to Git’s official website to download and install the current version of Git on your Linux-based system.

2. You just need to clone the repo then just use this command:

 git clone https://github.com/comfyanonymous/ComfyUI.git

And download from the Git repository.

3. After downloading it, just extract the folder into whatever folder you want to keep the files. To unzip the zipped folder using 7ZIP or WinRAR.

Note: Keep patience if it takes time because the model is very larger in size.

4. Now, make sure you have already set all the settings of Stable diffusion if you haven’t and set all the checkpoints/models (the huge ckpt/safetensors files) in the folder destination: ComfyUI/models/checkpoints

There are multiple Stable Diffusion Models you can install by navigating to the respective tutorials:

Install Stable Cascade

Install Stable Diffusion 3

Conclusion:

ComfyUI is the most easiest and understandable application for image generation. Imagine you don’t know the coding but still want to understand what is and where each segment is connecting to each other, then the connecting nodes make your life easier. 
Here, we have learned how to download and install ComfyUI which runs Stable Diffusion on Windows, Mac, and Linux.