Models are essential
Models are essential building blocks for media generation workflows. They can be combined and mixed to achieve different creative effects. The word model has many different meanings. Here, it means a data file carrying information that is required for a node graph to do its work. Specifically, it’s a data structure that models some function. As a verb, to model something means to represent it or provide an example. The primary example of a model data file in ComfyUI is an AI diffusion model. This is a large set of data that represents the complex relationships among text strings and images, making it possible to translate words into pictures or vice versa. Other examples of common models used for image generation are language models such as CLIP, and upscaling models such as RealESRGAN.Model files
Model files are absolutely required for generative media production. Nothing can happen in a workflow if the model files are not found. Models are not included in the ComfyUI installation, but ComfyUI can often automatically download and install missing model files. Many models can be downloaded and installed from the ComfyUI Manager window. Models can also be found at websites such as huggingface.co, civitai.green, and github.com.Using Models in ComfyUI
- Download and place them in the ComfyUI program directory
- Within the models folder, you’ll find subfolders for various types of models, such as checkpoints
- The ComfyUI Manager helps to automate the process of searching, downloading, and installing
- Restart ComfyUI if it’s running
- In your workflow, create the node appropriate to the model type, e.g. Load Checkpoint, Load LoRA, Load VAE
- In the loader node, choose the model you wish to use
- Connect the loader node to other nodes in your workflow
Adding External Model Paths
If you downloaded a model but ComfyUI cannot find it, you may need to add an additional model search path to the yaml file.Example scenario
You need to add a motion LoRA and your model is located inC:\Users\YourUsername\models\animatediff_motion_lora.
Solution
- Add the below configuration to the
extra_model_paths.yamlfile using the correct model type property name - Restart ComfyUI
loras- for LoRA modelscheckpoints- for checkpoint modelsvae- for VAE modelscontrolnet- for ControlNet modelsclip- for CLIP modelsupscale_models- for upscaling modelsembeddings- for textual inversion embeddingsconfigs- for configuration files
YAML config file location
For standard ComfyUI installations, create theextra_model_paths.yaml file directly in your ComfyUI folder (where main.py is located).
Desktop Application Instructions
If you’re using the ComfyUI Desktop application, the config file has a different name and location:- On Windows:
C:\Users\YourUsername\AppData\Roaming\ComfyUI\extra_models_config.yaml- You can quickly navigate to this by typing
%APPDATA%\ComfyUIin File Explorer address bar
- You can quickly navigate to this by typing
- On macOS:
~/Library/Application Support/ComfyUI/extra_models_config.yaml- Open Finder, press
Cmd+Shift+Gand enter~/Library/Application Support/ComfyUI
- Open Finder, press
- On Linux:
~/.config/ComfyUI/extra_models_config.yaml- Open your file manager and navigate to the hidden folder
~/.config/ComfyUI
- Open your file manager and navigate to the hidden folder