- Create a virtual environment(avoid polluting the system-level Python environment)
- Clone the ComfyUI code repository
- Install dependencies
- Start ComfyUI
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.
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.If you have not installed Microsoft Visual C++ Redistributable, please install it here.
Install GPU and ComfyUI dependencies
1
Install GPU dependencies
Install GPU Dependencies
Alternatively, you can install the nightly version of PyTorch.
Alternatively, you can install the nightly version of PyTorch.
Nvidia
Nvidia
Install Nightly
Install Nightly
Install Nightly version (might be more risky)
AMD
AMD
Install Nightly
Install Nightly
Install Nightly version (might be more risky)
Mac ARM Silicon
Mac ARM Silicon
2
Install ComfyUI dependencies
3
Start ComfyUI
Start the application
How to update ComfyUI
1
pull the latest code
Use the command line to enter the installation path of ComfyUI, then pull the latest code.
2
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 ofComfyUI/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
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 Copy and rename it to
extra_model_paths.yaml.example
in the root directory of ComfyUI: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 hereExample Structure
Suppose you want to add the following model paths to ComfyUI:extra_model_paths.yaml
file like below to let ComfyUI recognize the model paths on your device:
For the desktop version, please add the configuration to the existing configuration path without overwriting the path configuration generated during installation. Please back up the corresponding file before modification, so that you can restore it when you make a mistake.
D:\stable-diffusion-webui\
, you can modify the corresponding configuration to
Add Extra Custom Nodes Path
Besides adding external models, you can also add custom nodes paths that are not in the default path of ComfyUIPlease note that this will not change the default installation path of custom nodes, but will add an extra path search when starting ComfyUI. You still need to complete the installation of custom node dependencies in the corresponding environment to ensure the integrity of the running environment.