How to install ComfyUI manually in different systems
For the installation of ComfyUI, it is mainly divided into several steps:
- Create a virtual environment(avoid polluting the system-level Python environment)
- Clone the ComfyUI code repository
- Install dependencies
- Start ComfyUI
You can also refer to ComfyUI CLI to install ComfyUI, it is a command line tool that can easily install ComfyUI and manage its dependencies.
Create a virtual environment
Independent virtual environments are necessary because ComfyUI’s dependencies may conflict with other dependencies on the system, and it can also avoid polluting the system-level Python environment.
Install Miniconda. This will help you install the correct versions of Python and other libraries needed by ComfyUI.
Create an environment with Conda.
Clone the ComfyUI code repository
You need to ensure that you have installed Git on your system. First, you need to open the terminal (command line), then clone the code repository.
Open Terminal application.
Open Terminal application.
Install GPU and ComfyUI dependencies
Install GPU dependencies
Install GPU Dependencies
Nvidia
Nvidia
Alternatively, you can install the nightly version of PyTorch.
Install Nightly
Install Nightly
AMD
AMD
Alternatively, you can install the nightly version of PyTorch.
Install Nightly
Install Nightly
Mac ARM Silicon
Mac ARM Silicon
Install ComfyUI dependencies
Start ComfyUI
Start the application
How to update ComfyUI
pull the latest code
Use the command line to enter the installation path of ComfyUI, then pull the latest code.
install the dependencies
Use the command line to enter the installation path of ComfyUI, then install the dependencies.
You need to ensure that the current Python environment is the ComfyUI virtual environment, otherwise the dependencies will be installed to the system-level Python environment, polluting the system-level Python environment.
Adding Extra Model Paths
If you want to manage your model files outside of ComfyUI/models
, you may have the following reasons:
- You have multiple ComfyUI instances and want them to share model files to save disk space
- You have different types of GUI programs (such as WebUI) and want them to use the same model files
- Model files cannot be recognized or found
We provide a way to add extra model search paths via the extra_model_paths.yaml
configuration file
Open Config File
For the ComfyUI version such as portable and manual, you can find an example file named extra_model_paths.yaml.example
in the root directory of ComfyUI:
Copy and rename it to extra_model_paths.yaml
for use. Keep it in ComfyUI’s root directory at ComfyUI/extra_model_paths.yaml
.
You can also find the config example file here
For the ComfyUI version such as portable and manual, you can find an example file named extra_model_paths.yaml.example
in the root directory of ComfyUI:
Copy and rename it to extra_model_paths.yaml
for use. Keep it in ComfyUI’s root directory at ComfyUI/extra_model_paths.yaml
.
You can also find the config example file here
If you are using the ComfyUI Desktop application, you can follow the image below to open the extra model config file:
Or open it directly at:
You should keep the file in the same directory, should not move these files to other places.
If the file does not exist, you can create it yourself with any text editor.
Example Structure
Suppose you want to add the following model paths to ComfyUI:
Then you can configure the extra_model_paths.yaml
file like below to let ComfyUI recognize the model paths on your device:
or
Or you can refer to the default extra_model_paths.yaml.example for more configuration options. After saving, you need to restart ComfyUI for the changes to take effect.
Below is the original config example:
For example, if your WebUI is located at D:\stable-diffusion-webui\
, you can modify the corresponding configuration to