# Import models Source: https://docs.comfy.org/cloud/import-models Learn how to import models from Civitai and Hugging Face to Comfy Cloud This is a **Comfy Cloud** feature and is only available in the cloud version. To learn more about Comfy Cloud, see [Comfy Cloud](/get_started/cloud). ## Overview Comfy Cloud allows you to import models directly from Civitai and Hugging Face. This feature is available for users with a **Creator** subscription or higher. ## Requirements * **Subscription**: Creator tier or above * **Supported sources**: Civitai and Hugging Face ## How to import models ### 1. Access the import feature Import 1. Click the **Models** button in the left sidebar to open the Model Library. 2. In the Model Library modal, click the **Import** button. ### 2. Paste the link 1. Paste the model link you obtained from Hugging Face or Civitai. Import Modal 2. If the link is valid, you will see a confirmation indicator and can click the `Continue` button to proceed. Import Modal 3. Select the model type and target folder. Import Modal 4. Wait for the model to finish downloading. Import Modal 5. Once downloaded, you can find the model in your Model Library. ## How to view imported models In the Model Library, select "My Models" in the dropdown filter to filter out the models you imported. Imported Models ## How to get model import links ### 1. Get link from Civitai 1. Go to [Civitai](https://civitai.com/) and find the model you want to import. 2. Right-click the download button and select "Copy link address" to get the model download link. Copy Civitai Link ### 2. Get link from Hugging Face 1. Go to [Hugging Face](https://huggingface.co/) and find the model repository you want to import. 2. Navigate to the model files page. Supported formats are typically ".safetensor" or ".sft" files. Click on the specific model name to enter its detail page. Copy Huggingface model link 3. On the detail page, click the `Copy Download Link` button to get the model download link. Copy Huggingface model link ## FAQ Yes. Only **safetensor** file types are supported. There is effectively no file size limit (up to 100GB). Models you import are **private to you**. Only you can see the models in your library. Currently, you need to upload the model to a **public Hugging Face or Civitai repository** first, then import from those platforms. No. You will need to combine chunked model files into one file before importing. This feature is available for **Creator** and **Pro** plans only. No. This is a **Cloud-only** feature. Yes. You can delete models you imported. Note that models uploaded by the Comfy internal team cannot be deleted. # Custom Nodes Source: https://docs.comfy.org/development/core-concepts/custom-nodes Learn about installing, enabling dependencies, updating, disabling, and uninstalling custom nodes in ComfyUI ## About Custom Nodes After installing ComfyUI, you'll discover that it includes many built-in nodes. These native nodes are called **Comfy Core** nodes, which are officially maintained by ComfyUI. Additionally, there are numerous [**custom nodes**](https://registry.comfy.org) created by various authors from the ComfyUI community. These custom nodes bring extensive functionality to ComfyUI, greatly expanding its capabilities and feature boundaries. In this guide, we'll cover various operations related to custom nodes, including installation, updates, disabling, uninstalling, and dependency installation. Anyone can develop their own custom extensions for ComfyUI and share them with others. You can find many community custom nodes [here](https://registry.comfy.org). If you want to develop your own custom nodes, visit the section below to get started: Learn how to start developing a custom node ## Custom Node Management In this section we will cover: * Installing custom nodes * Installing node dependencies * Custom node version control * Uninstalling custom nodes * Temporarily disabling custom nodes * Handling custom node dependency conflicts ### 1. Installing Custom Nodes Currently, ComfyUI supports installing custom nodes through multiple methods, including: * [Install via ComfyUI Manager (Recommended)](#install-via-comfyui-manager) * Install via Git * Manual installation We recommend installing custom nodes through **ComfyUI Manager**, which is a highly significant tool in the ComfyUI custom node ecosystem. It makes custom node management (such as searching, installing, updating, disabling, and uninstalling) simple - you just need to search for the node you want to install in ComfyUI Manager and click install. However, since all custom nodes are currently stored on GitHub, for regions that cannot access GitHub normally, we have written detailed instructions for different custom node installation methods in this guide. Additionally, since we recommend using **ComfyUI Manager** for plugin management, we recommend using this tool for plugin management. You can find its source code [here](https://github.com/Comfy-Org/ComfyUI-Manager). Therefore, in this documentation, we will use installing ComfyUI Manager as a custom node installation example, and supplement how to use it for node management in the relevant introduction sections. Since ComfyUI Manager has very rich functionality, we will use a separate document to introduce the ComfyUI Manager installation chapter. Please visit the link below to learn how to use ComfyUI Manager to install custom nodes. Learn how to use ComfyUI Manager to install custom nodes First, you need to ensure that Git is installed on your system. You can check if Git is installed by entering the following command in your system terminal: ```bash theme={null} git --version ``` If Git is installed, you will see output similar to the following: Windows Terminal If not yet installed, please visit [git-scm.com](https://git-scm.com/) to download the corresponding installation package. Linux users please refer to [git-scm.com/downloads/linux](https://git-scm.com/downloads/linux) for installation instructions. For ComfyUI Desktop version, you can use the Desktop terminal as shown below to complete the installation. ComfyUI Desktop Terminal After completing the Git installation, we need the repository address of the custom node. Here we use the ComfyUI-Manager repository address as an example: ```bash theme={null} https://github.com/Comfy-Org/ComfyUI-Manager ``` For regions that cannot access GitHub smoothly, you can try using other code hosting service websites to fork the corresponding repository, then use that repository address to complete the node installation, such as gitee, etc. First, we need to navigate to the ComfyUI custom nodes directory. Using ComfyUI portable version as an example, if the folder location is `D:\ComfyUI_windows_portable`, then you should be able to find the custom nodes folder at `D:\ComfyUI_windows_portable\ComfyUI\custom_nodes`. First, we need to use the `cd` command to enter the corresponding directory: ```bash theme={null} cd D:\ComfyUI_windows_portable\ComfyUI\custom_nodes ``` Then we use the `git clone` command to complete the node installation: ```bash theme={null} git clone https://github.com/Comfy-Org/ComfyUI-Manager ``` If everything goes smoothly, you will see output similar to the following: Install Custom Nodes via Git This means you have successfully cloned the custom node code. Next, we need to install the corresponding dependencies. Please refer to the instructions in the [Installing Node Dependencies](#installing-node-dependencies) section for dependency installation. Manual installation is not the recommended installation method, but it serves as a backup option when you cannot install smoothly using git. Plugins installed this way will lose the corresponding git version history information and will not be convenient for subsequent version management. For manual installation, we need to first download the corresponding node code and then extract it to the appropriate directory. Download Node Code Visit the corresponding custom node repository page: 1. Click the `Code` button 2. Then click the `Download ZIP` button to download the ZIP package 3. Extract the ZIP package Copy the extracted code from the above steps to the ComfyUI custom nodes directory. Using ComfyUI portable version as an example, if the folder location is `D:\ComfyUI_windows_portable`, then you should be able to find the custom nodes folder at `D:\ComfyUI_windows_portable\ComfyUI\custom_nodes`. Copy the extracted code from the above steps to the corresponding directory. Please refer to the instructions in the [Installing Node Dependencies](#installing-node-dependencies) section for dependency installation. ### 2. Installing Node Dependencies Custom nodes all require the installation of related dependencies. For example, for ComfyUI-Manager, you can visit the [requirements.txt](https://github.com/Comfy-Org/ComfyUI-Manager/blob/main/requirements.txt) file to view the dependency package requirements. In the previous steps, we only cloned the custom node code locally and did not install the corresponding dependencies, so next we need to install the corresponding dependencies. Actually, if you use ComfyUI-Manager to install plugins, ComfyUI Manager will automatically help you complete the dependency installation. You just need to restart ComfyUI after installing the plugin. This is why we strongly recommend using ComfyUI Manager to install custom nodes. But perhaps you may not be able to use ComfyUI Manager to install custom nodes smoothly in some situations, so we provide this more detailed dependency installation guide. In the [Dependencies](/development/core-concepts/dependencies) chapter, we introduced the relevant content about dependencies in ComfyUI. ComfyUI is a **Python**-based project, and we built an independent **Python** runtime environment for running ComfyUI. All related dependencies need to be installed in this independent **Python** runtime environment. If you run `pip install -r requirements.txt` directly in the system-level terminal, the corresponding dependencies may be installed in the system-level **Python** environment, which will cause the dependencies to still be missing in ComfyUI's environment, preventing the corresponding custom nodes from running normally. So next we need to use ComfyUI's independent Python runtime environment to complete the dependency installation. Depending on different ComfyUI versions, we will use different methods to install the corresponding dependencies: For ComfyUI Portable version, it uses an embedded Python located in the `\ComfyUI_windows_portable\python_embeded` directory. We need to use this Python to complete the dependency installation. First, start the terminal in the portable version directory, or use the `cd` command to navigate to the `\ComfyUI_windows_portable\` directory after starting the terminal. Start Terminal Ensure that the terminal directory is `\ComfyUI_windows_portable\`, as shown below for `D:\ComfyUI_windows_portable\` Terminal Then use `python_embeded\python.exe` to complete the dependency installation: ```bash theme={null} python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-Manager\requirements.txt ``` Of course, you can replace ComfyUI-Manager with the name of the custom node you actually installed, but make sure that a `requirements.txt` file exists in the corresponding node directory. Since ComfyUI Desktop already has ComfyUI-Manager and its dependencies installed during the installation process, and this guide uses ComfyUI Manager as an example for custom node installation, you don't actually need to perform ComfyUI Manager dependency installation in the desktop version. If there are no unexpected issues, we recommend using ComfyUI Manager to install custom nodes, so you don't need to manually install dependencies. ComfyUI Desktop Terminal Then use the following command to install the dependencies for the corresponding plugin: ```bash theme={null} pip install -r .\custom_nodes\\requirements.txt ``` As shown below, this is the dependency installation for ComfyUI-Hunyuan3Dwrapper: ComfyUI Desktop Dependency Installation For users with custom Python environments, we recommend using `pip install -r requirements.txt` to complete the dependency installation. ### Custom Node Version Control Custom node version control is actually based on Git version control. You can manage node versions through Git, but ComfyUI Manager has already integrated this version management functionality very well. Many thanks to [@Dr.Lt.Data](https://github.com/ltdrdata) for bringing us such a convenient tool. In this section, we will still explain these two different plugin version management methods for you, but if you use ZIP packages for manual installation, the corresponding git version history information will be lost, making it impossible to perform version management. Since we are iterating on ComfyUI Manager, the actual latest interface and steps may change significantly Perform the corresponding operations as shown to enter the ComfyUI Manager interface You can use the corresponding filters to filter out installed node packages and then perform the corresponding node management Switch to the corresponding version. Manager will help you complete the corresponding dependency updates and installation. Usually, you need to restart ComfyUI after switching versions for the changes to take effect. Find the directory folder where your corresponding node is located, such as `ComfyUI/custom_nodes/ComfyUI-Manager` Use the `cd` command to enter the corresponding folder: ```bash theme={null} cd /ComfyUI/custom_nodes/ComfyUI-Manager ``` You can use the following command to view all available tags and releases: ```bash theme={null} git tag ``` This will list all version tags, and you can choose the version you want to switch to. Use the following command to switch to a specified tag or release: ```bash theme={null} git checkout ``` Replace `` with the specific version tag you want to switch to. If you want to switch to a specific commit version, you can use the following command: ```bash theme={null} git checkout ``` Replace `` with the specific commit hash you want to switch to. Since the dependencies of the corresponding custom node package may change after version switching, you need to reinstall the dependencies for the corresponding node. Please refer to the instructions in the [Installing Node Dependencies](#2-installing-node-dependencies) section to enter the corresponding environment for installation. ### Uninstalling Custom Nodes To be updated ### Temporarily Disabling Custom Nodes To be updated ### Custom Node Dependency Conflicts To be updated ## ComfyUI Manager ComfyUI Manager Interface This tool is currently included by default in the [Desktop version](/installation/desktop/windows), while in the [Portable version](/installation/comfyui_portable_windows), you need to refer to the installation instructions in the [Install Manager](#installing-custom-nodes) section of this document. As ComfyUI continues to develop, ComfyUI Manager plays an increasingly important role in ComfyUI. Currently, ComfyUI-Manager has officially joined the Comfy Org organization, officially becoming part of ComfyUI's core dependencies, and continues to be maintained by the original author [Dr.Lt.Data](https://github.com/ltdrdata). You can read [this blog post](https://blog.comfy.org/p/comfyui-manager-joins-comfy-org) for more information. In future iterations, we will greatly optimize the use of ComfyUI Manager, so the interface shown in this documentation may differ from the latest version of ComfyUI Manager. ### Installing the Manager If you are running the ComfyUI server application, you need to install the manager. If ComfyUI is running, please close it before continuing. The first step is to install Git, which is a command-line application for software version control. Git will download the ComfyUI manager from [github.com](https://github.com). Download and install Git from [git-scm.com](https://git-scm.com/). After installing Git, navigate to the ComfyUI server program directory and enter the folder labeled **custom\_nodes**. Open a command window or terminal. Make sure the command line shows the current directory path as **custom\_nodes**. Enter the following command. This will download the manager. Technically, this is called *cloning a Git repository*. ### Detecting Missing Nodes After installing the manager, you can detect missing nodes in the manager. ComfyUI Manager Interface ## Developing a Custom Node If you have some development capabilities, please start with the documentation below to learn how to begin developing a custom node. Learn how to start developing a custom node # Dependencies Source: https://docs.comfy.org/development/core-concepts/dependencies Understand dependencies in ComfyUI ## A workflow file depends on other files We often obtain various workflow files from the community, but frequently find that the workflow cannot run directly after loading. This is because a workflow file depends on other files besides the workflow itself, such as media asset inputs, models, custom nodes, related Python dependencies, etc. ComfyUI workflows can only run normally when all relevant dependencies are satisfied. ComfyUI workflow dependencies mainly fall into the following categories: * Assets (media files including audio, video, images, and other inputs) * Custom nodes * Python dependencies * Models (such as Stable Diffusion models, etc.) ## Assets An AI model is an example of an ***asset***. In media production, an asset is some media file that supplies input data. For example, a video editing program operates on movie files stored on disk. The editing program's project file holds links to these movie file assets, allowing non-destructive editing that doesn't alter the original movie files. ComfyUI works the same way. A workflow can only run if all of the required assets are found and loaded. Generative AI models, images, movies, and sounds are some examples of assets that a workflow might depend upon. These are therefore known as ***dependent assets*** or ***asset dependencies***. ## Custom Nodes Custom nodes are an important component of ComfyUI that extend its functionality. They are created by the community and can be installed to add new capabilities to your workflows. ## Python Dependencies ComfyUI is a Python-based project. We build a standalone Python environment to run ComfyUI, and all related dependencies are installed in this isolated Python environment. ### ComfyUI Dependencies You can view ComfyUI's current dependencies in the [requirements.txt](https://github.com/comfyanonymous/ComfyUI/blob/master/requirements.txt) file: ```text theme={null} comfyui-frontend-package==1.32.9 comfyui-workflow-templates==0.7.25 comfyui-embedded-docs==0.3.1 torch torchsde torchvision torchaudio numpy>=1.25.0 einops transformers>=4.50.3 tokenizers>=0.13.3 sentencepiece safetensors>=0.4.2 aiohttp>=3.11.8 yarl>=1.18.0 pyyaml Pillow scipy tqdm psutil alembic SQLAlchemy av>=14.2.0 #non essential dependencies: kornia>=0.7.1 spandrel pydantic~=2.0 pydantic-settings~=2.0 ``` As ComfyUI evolves, we may adjust dependencies accordingly, such as adding new dependencies or removing ones that are no longer needed. So if you use Git to update ComfyUI, you need to run the following command in the corresponding environment after pulling the latest updates: ```bash theme={null} pip install -r requirements.txt ``` This ensures that ComfyUI's dependencies are up to date for proper operation. You can also modify specific package dependency versions to upgrade or downgrade certain dependencies. Additionally, ComfyUI's frontend [ComfyUI\_frontend](https://github.com/Comfy-Org/ComfyUI_frontend) is currently maintained as a separate project. We update the `comfyui-frontend-package` dependency version after the corresponding version stabilizes. If you need to switch to a different frontend version, you can check the version information [here](https://pypi.org/project/comfyui-frontend-package/#history). ### Custom Node Dependencies Thanks to the efforts of many authors in the ComfyUI community, we can extend ComfyUI's functionality by using different custom nodes, enabling impressive creativity. Typically, each custom node has its own dependencies and a separate `requirements.txt` file. If you use [ComfyUI Manager](https://github.com/ltdrdata/ComfyUI-Manager) to install custom nodes, ComfyUI Manager will usually automatically install the corresponding dependencies. There are also cases where you need to install dependencies manually. Currently, all custom nodes are installed in the `ComfyUI/custom_nodes` directory. You need to navigate to the corresponding plugin directory in your ComfyUI Python environment and run `pip install -r requirements.txt` to install the dependencies. If you're using the [Windows Portable version](/installation/comfyui_portable_windows), you can use the following command in the `ComfyUI_windows_portable` directory: ``` python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\\requirements.txt ``` to install the dependencies for the corresponding node. ### Dependency Conflicts Dependency conflicts are a common issue when using ComfyUI. You might find that after installing or updating a custom node, previously installed custom nodes can no longer be found in ComfyUI's node library, or error pop-ups appear. One possible reason is dependency conflicts. There can be many reasons for dependency conflicts, such as: 1. Custom node version locking Some plugins may fix the exact version of a dependency library (e.g., `open_clip_torch==2.26.1`), while other plugins may require a higher version (e.g., `open_clip_torch>=2.29.0`), making it impossible to satisfy both version requirements simultaneously. **Solution**: You can try changing the fixed version dependency to a range constraint, such as `open_clip_torch>=2.26.1`, and then reinstall the dependencies to resolve these issues. 2. Environment pollution During the installation of custom node dependencies, it may overwrite versions of libraries already installed by other plugins. For example, multiple plugins may depend on `PyTorch` but require different CUDA versions, and the later installed plugin will break the existing environment. **Solutions**: * You can try manually installing specific versions of dependencies in the Python virtual environment to resolve such issues. * Or create different Python virtual environments for different plugins to resolve these issues. * Try installing plugins one by one, restarting ComfyUI after each installation to observe if dependency conflicts occur. 3. Custom node dependency versions incompatible with ComfyUI dependency versions These types of dependency conflicts may be more difficult to resolve, and you may need to upgrade/downgrade ComfyUI or change the dependency versions of custom nodes to resolve these issues. **Solution**: These types of dependency conflicts may be more difficult to resolve, and you may need to upgrade/downgrade ComfyUI or change the dependency versions of custom nodes to resolve these issues. ## Models Models are a significant asset dependency for ComfyUI. Various custom nodes and workflows are built around specific models, such as the Stable Diffusion series, Flux series, Ltxv, and others. These models are an essential foundation for creation with ComfyUI, so we need to ensure that the models we use are properly available. Typically, our models are saved in the corresponding directory under `ComfyUI/models/`. Of course, you can also create an [extra\_model\_paths.yaml](https://github.com/comfyanonymous/ComfyUI/blob/master/extra_model_paths.yaml.example) by modifying the template to make additional model paths recognized by ComfyUI. This allows multiple ComfyUI instances to share the same model library, reducing disk usage. ## Software An advanced application like ComfyUI also has ***software dependencies***. These are libraries of programming code and data that are required for the application to run. Custom nodes are examples of software dependencies. On an even more fundamental level, the Python programming environment is the ultimate dependency for ComfyUI. The correct version of Python is required to run a particular version of ComfyUI. Updates to Python, ComfyUI, and custom nodes can all be handled from the **ComfyUI Manager** window. ComfyUI Custom Nodes Manager # Links Source: https://docs.comfy.org/development/core-concepts/links Understand connection links in ComfyUI As ComfyUI is still in rapid iteration and development, we are continuously improving it every day. Therefore, some operations mentioned in this article may change or be omitted. Please refer to the actual interface. If you find changes in actual operations, it may be due to our iterative updates. You can also fork [this repo](https://github.com/Comfy-Org/docs) and help us improve this documentation. ## Links connect nodes In the terminology of ComfyUI, the lines or curves between nodes are called ***links***. They're also known as ***connections*** or wires. Links can be displayed in several ways, such as curves, right angles, straight lines, or completely hidden. Link styles You can modify the link style in **Setup Menu** --> **Display (Lite Graph)** --> **Graph** --> **Link Render Mode**. Canvas Menu You can also temporarily hide links in the **Canvas Menu**. Canvas Menu Link display is crucial. Depending on the situation, it may be necessary to see all links. Especially when learning, sharing, or even just understanding workflows, the visibility of links enables users to follow the flow of data through the graph. For packaged workflows that aren't intended to be altered, it might make sense to hide the links to reduce clutter. ### Reroute node If legibility of the graph structure is important, then link wires can be manually routed in the 2D space of the graph with a tiny node called **Reroute**. Its purpose is to position the beginning and/or end points of link wires to ensure visibility. We can design a workflow so that link wires don't pass behind nodes, don't cross other link wires, and so on. ComfyUI Reroute node We are also continuously improving the native reroute functionality in litegraph. We recommend using this feature in the future to reorganize connections. ComfyUI Native Reroute ## Color-coding The data type of node properties is indicated by color coding of input/output ports and link connection wires. We can always tell which inputs and outputs can be connected to one another by their color. Ports can only be connected to other ports of the same color to ensure matching data types. Common data types: ComfyUI Node Data Types | Data type | Color | | ------------------------- | ------------ | | diffusion model | lavender | | CLIP model | yellow | | VAE model | rose | | conditioning | orange | | latent image | pink | | pixel image | blue | | mask | green | | number (integer or float) | light green | | mesh | bright green | # Models Source: https://docs.comfy.org/development/core-concepts/models ## 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 multimodal vision and language models such as CLIP, and upscaling models such as RealESRGAN. ## Model files Model files are indispensable for generative media production. Without them, workflows cannot proceed effectively. 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](https://huggingface.co), [civitai.green](https://civitai.green), and [github.com](https://github.com). ### Using Models in ComfyUI 1. Download and place them in the ComfyUI program directory 1. Within the **models** folder, you'll find subfolders for various types of models, such as **checkpoints** 2. The **ComfyUI Manager** helps to automate the process of searching, downloading, and installing 3. Restart ComfyUI if it's running 2. In your workflow, create the node appropriate to the model type, e.g. **Load Checkpoint**, **Load LoRA**, **Load VAE** 3. In the loader node, choose the model you wish to use 4. Connect the loader node to other nodes in your workflow ## 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](/installation/comfyui_portable_windows) and [manual](/installation/manual_install), you can find an example file named `extra_model_paths.yaml.example` in the root directory of ComfyUI: ``` ComfyUI/extra_model_paths.yaml.example ``` 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](https://github.com/comfyanonymous/ComfyUI/blob/master/extra_model_paths.yaml.example) If you are using the [ComfyUI Desktop](/installation/desktop/windows) application, you can follow the image below to open the extra model config file: Open Config File Or open it directly at: ``` C:\Users\YourUsername\AppData\Roaming\ComfyUI\extra_models_config.yaml ``` ``` ~/Library/Application Support/ComfyUI/extra_models_config.yaml ``` 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: ``` πŸ“ YOUR_PATH/ β”œβ”€β”€ πŸ“models/ | β”œβ”€β”€ πŸ“ loras/ | β”‚ └── xxxxx.safetensors | β”œβ”€β”€ πŸ“ checkpoints/ | β”‚ └── xxxxx.safetensors | β”œβ”€β”€ πŸ“ vae/ | β”‚ └── xxxxx.safetensors | └── πŸ“ controlnet/ | └── xxxxx.safetensors ``` Then you can configure the `extra_model_paths.yaml` file like below to let ComfyUI recognize the model paths on your device: ``` my_custom_config: base_path: YOUR_PATH loras: models/loras/ checkpoints: models/checkpoints/ vae: models/vae/ controlnet: models/controlnet/ ``` or ``` my_custom_config: base_path: YOUR_PATH/models/ loras: loras checkpoints: checkpoints vae: vae controlnet: controlnet ``` 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. Or you can refer to the default [extra\_model\_paths.yaml.example](https://github.com/comfyanonymous/ComfyUI/blob/master/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: ```yaml theme={null} #Rename this to extra_model_paths.yaml and ComfyUI will load it #config for a1111 ui #all you have to do is change the base_path to where yours is installed a111: base_path: path/to/stable-diffusion-webui/ checkpoints: models/Stable-diffusion configs: models/Stable-diffusion vae: models/VAE loras: | models/Lora models/LyCORIS upscale_models: | models/ESRGAN models/RealESRGAN models/SwinIR embeddings: embeddings hypernetworks: models/hypernetworks controlnet: models/ControlNet #config for comfyui #your base path should be either an existing comfy install or a central folder where you store all of your models, loras, etc. #comfyui: # base_path: path/to/comfyui/ # # You can use is_default to mark that these folders should be listed first, and used as the default dirs for eg downloads # #is_default: true # checkpoints: models/checkpoints/ # clip: models/clip/ # clip_vision: models/clip_vision/ # configs: models/configs/ # controlnet: models/controlnet/ # diffusion_models: | # models/diffusion_models # models/unet # embeddings: models/embeddings/ # loras: models/loras/ # upscale_models: models/upscale_models/ # vae: models/vae/ #other_ui: # base_path: path/to/ui # checkpoints: models/checkpoints # gligen: models/gligen # custom_nodes: path/custom_nodes ``` For example, if your WebUI is located at `D:\stable-diffusion-webui\`, you can modify the corresponding configuration to ```yaml theme={null} a111: base_path: D:\stable-diffusion-webui\ checkpoints: models/Stable-diffusion configs: models/Stable-diffusion vae: models/VAE loras: | models/Lora models/LyCORIS upscale_models: | models/ESRGAN models/RealESRGAN models/SwinIR embeddings: embeddings hypernetworks: models/hypernetworks controlnet: models/ControlNet ``` ### Add Extra Custom Nodes Path Besides adding external models, you can also add custom nodes paths that are not in the default path of ComfyUI Please 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. Below is a simple configuration example (MacOS), please modify it according to your actual situation and add it to the corresponding configuration file, save it and restart ComfyUI for the changes to take effect: ```yaml theme={null} my_custom_nodes: custom_nodes: /Users/your_username/Documents/extra_custom_nodes ``` ### File size Models can be extremely large files relative to image files. A typical uncompressed image may require a few megabytes of disk storage. Generative AI models can be tens of thousands of times larger, up to tens of gigabytes per model. They take up a great deal of disk space and take a long time to transfer over a network. ## Model training and refinement A generative AI model is created by training a machine learning program on a very large set of data, such as pairs of images and text descriptions. An AI model doesn’t store the training data explicitly, but rather it stores the correlations that are implicit within the data. Organizations and companies such as Stability AI and Black Forest Labs release β€œbase” models that carry large amounts of generic information. These are general purpose generative AI models. Commonly, the base models need to be ***refined*** in order to get high quality generative outputs. A dedicated community of people work to refine the base models. The new, refined models produce better output, provide new or different functionality, and/or use fewer resources. Refined models can usually be run on systems with less computing power and/or memory. ## Auxiliary models Model functionality can be extended with auxiliary models. For example, art directing a text-to-image workflow to achieve a specific result may be difficult or impossible using a diffusion model alone. Additional models can refine a diffusion model within the workflow graph to produce desired results. Examples include **LoRA** (Low Rank Adaptation), a small model that is trained on a specific subject; **ControlNet**, a model that helps control composition using a guide image; and **Inpainting**, a model that allows certain diffusion models to generate new content within an existing image. auxiliary models ## Uninstalling models ComfyUI does not currently support uninstalling models through the frontend interface. If you want to remove or uninstall models, you need to manually delete the corresponding model files from the `ComfyUI/models/` directory on your system. ## Common issues ComfyUI does not natively support GGUF format models. To use GGUF models, you need to install community custom nodes such as [ComfyUI-GGUF](https://github.com/city96/ComfyUI-GGUF). If you've installed a model but can't find it in ComfyUI, try these steps: * Verify the model is in the correct location: * For **ComfyUI Desktop**: Go to **Help** menu β†’ **Open Folder** β†’ **Open Model Folder** to check the model installation path * Ensure your model file is placed in the correct subfolder (e.g., `checkpoints`, `loras`, `vae`) * Press the `r` key to refresh node definitions so ComfyUI can detect the model * Restart ComfyUI * Ensure the correct model is selected in the model loader node # Nodes Source: https://docs.comfy.org/development/core-concepts/nodes Understand the concept of a node in ComfyUI. In ComfyUI, nodes are the fundamental building blocks for executing tasks. Each node is an independently built module, whether it's a **Comfy Core** node or a **Custom Node**, with its own unique functionality. Nodes connect to each other through links, allowing us to build complex functionality like assembling LEGO blocks. The combinations of different nodes create the unlimited possibilities of ComfyUI. Comfy Core K-Sampler Node For example, in the K-Sampler node, you can see it has multiple inputs and outputs, and also includes multiple parameter settings. These parameters determine the logic of node execution. Behind each node is well-written Python logic, allowing you to achieve corresponding functionality without having to write code yourself. ComfyUI is under active development, so some details here may be outdated. If you spot something that's changed, feel free to [help us update the docs](https://github.com/Comfy-Org/docs). ## Nodes perform operations In computer science, a ***node*** is a container for information, usually including programmed instructions to perform some task. Nodes almost never exist in isolation, they're almost always connected to other nodes in a networked graph. In ComfyUI, nodes take the visual form of boxes that are connected to each other. ComfyUI nodes are usually ***function operators***. This means that they operate on some data to perform a function. A function is a process that accepts input data, performs some operation on it, and produces output data. In other words, nodes do some work, contributing to the completion of a task such as generating an image. So ComfyUI nodes almost always have at least one input or output, and usually have multiple inputs and outputs. ## Different Node States Node States In ComfyUI, nodes have multiple states. Here are some common node states: 1. **Normal State**: The default state 2. **Running State**: The running state, typically displayed when a node is executing after you start running the workflow 3. **Error State**: Node error, typically displayed after running the workflow if there's a problem with the node's input, indicated by red marking of the erroneous input node. You need to fix the problematic input to ensure the workflow runs correctly 4. **Missing State**: This state usually appears after importing workflows, with two possibilities: * Comfy Core native node missing: This usually happens because ComfyUI has been updated, but you're using an older version of ComfyUI. You need to update ComfyUI to resolve this issue * Custom node missing: The workflow uses custom nodes developed by third-party authors, but your local ComfyUI version doesn't have these custom nodes installed. You can use [ComfyUI-Manager](https://github.com/Comfy-Org/ComfyUI-Manager) to find and install the missing custom nodes ## Connections Between Nodes In ComfyUI, nodes are connected through [links](/development/core-concepts/links), allowing data of the same type to flow between different processing units to achieve the final result. ComfyUI Node Links Each node receives some input, processes it through its module, and converts it to corresponding output. Connections between different nodes must conform to the data type requirements. In ComfyUI, we use different colors to distinguish node data types. Below are some basic data types: ComfyUI Node Data Types | Data type | Color | | ------------------------- | ------------ | | diffusion model | lavender | | CLIP model | yellow | | VAE model | rose | | conditioning | orange | | latent image | pink | | pixel image | blue | | mask | green | | number (integer or float) | light green | | mesh | bright green | As ComfyUI evolves, we may expand to more data types to meet the needs of more scenarios. ### Connecting and Disconnecting Nodes ComfyUI Node Connecting **Connecting**: Drag from the output point of one node to the input of the same color on another node to connect them **Disconnecting**: Click on the input endpoint and drag the mouse left button to disconnect, or cancel the connection through the midpoint menu of the link ## Node Appearance Node Appearance We provide various style settings for you to customize the appearance of nodes: * Modify styles * Double-click the node title to modify the node name * Resize the node by dragging any corner