# Custom Nodes Source: https://docs.comfy.org/basic-concepts/custom-nodes Custom nodes in ComfyUI: how they differ from Comfy Core nodes, plus installing, updating, enabling dependencies, disabling, and uninstalling them. ## 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: > [card] [Start Developing Custom Nodes](/custom-nodes/overview) > > 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. > [tab] Install via ComfyUI Manager > > 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. > > > [card] [Install Custom Nodes with ComfyUI Manager](/installation/install_custom_node#method-1-comfyui-manager-recommended) > > > > Learn how to use ComfyUI Manager to install custom nodes > [tab] Install via Git > > **1. Ensure Git is Installed** > > 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](https://mintcdn.com/dripart/CGWmMjlFmU7msQ5S/images/concepts/custom_nodes/win_terminal.jpg?fit=max\&auto=format\&n=CGWmMjlFmU7msQ5S\&q=85\&s=c0e90164d3a1c8f9ed0f54164b16443b) > > 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. > > > [!TIP] > > > > For Comfy Desktop version, you can use the Desktop terminal as shown below to complete the installation. > > > > ![Comfy Desktop Terminal](https://mintcdn.com/dripart/-uf1LbfqYw9IrpmN/images/concepts/custom_nodes/desktop_terminal.png?fit=max\&auto=format\&n=-uf1LbfqYw9IrpmN\&q=85\&s=333c167906d375f684542c19a938d2ff) > > **2. Clone Custom Node Code to Directory** > > 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 > ``` > > > [!TIP] > > > > 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](https://mintcdn.com/dripart/Rig0_LOInmwVbVSB/images/concepts/custom_nodes/install_custom_nodes_by_git.jpg?fit=max\&auto=format\&n=Rig0_LOInmwVbVSB\&q=85\&s=80409dceca35c9d58c42dde48c4c53a5) > > This means you have successfully cloned the custom node code. Next, we need to install the corresponding dependencies. > > **3. Install Dependencies** > > Please refer to the instructions in the [Installing Node Dependencies](#2-installing-node-dependencies) section for dependency installation. > [tab] Manual Installation > > Manual installation is not the recommended installation method, but it serves as a backup option when you cannot install smoothly using git. > > > [!WARNING] > > > > Plugins installed this way will lose the corresponding git version history information and will not be convenient for subsequent version management. > > **1. Download Custom Node Code ZIP Package** > > For manual installation, we need to first download the corresponding node code and then extract it to the appropriate directory. > > ![Download Node Code](https://mintcdn.com/dripart/Rig0_LOInmwVbVSB/images/concepts/custom_nodes/download_zip.jpg?fit=max\&auto=format\&n=Rig0_LOInmwVbVSB\&q=85\&s=34fa06cf4580152428c5d2b55b192911) > > 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 > > **2. Copy Files to ComfyUI Custom Nodes Directory** > > 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. > > **3. Install Dependencies** > > Please refer to the instructions in the [Installing Node Dependencies](#2-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. > [!NOTE] > > 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](/basic-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: > [tab] ComfyUI Portable > > 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](https://mintcdn.com/dripart/Rig0_LOInmwVbVSB/images/concepts/custom_nodes/open_terminal.jpg?fit=max\&auto=format\&n=Rig0_LOInmwVbVSB\&q=85\&s=ee4569d27b4ef901c5f67d8f795b448c) > > Ensure that the terminal directory is `\ComfyUI_windows_portable\`, as shown below for `D:\ComfyUI_windows_portable\` > > ![Terminal](https://mintcdn.com/dripart/CGWmMjlFmU7msQ5S/images/concepts/custom_nodes/terminal.jpg?fit=max\&auto=format\&n=CGWmMjlFmU7msQ5S\&q=85\&s=f6da2e8c4eef1016e6fde84ee5527ce0) > > 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. > [tab] Comfy Desktop > > > [!TIP] > > > > Since Comfy 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. > > ![Comfy Desktop Terminal](https://mintcdn.com/dripart/-uf1LbfqYw9IrpmN/images/concepts/custom_nodes/desktop_terminal.png?fit=max\&auto=format\&n=-uf1LbfqYw9IrpmN\&q=85\&s=333c167906d375f684542c19a938d2ff) > > 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: > > ![Comfy Desktop Dependency Installation](https://mintcdn.com/dripart/-uf1LbfqYw9IrpmN/images/concepts/custom_nodes/install_dependencies.png?fit=max\&auto=format\&n=-uf1LbfqYw9IrpmN\&q=85\&s=ab31e7626f27d5a7da7171f985d1b305) > [tab] Custom Python Environment Users > > 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. > [tab] Version Management with ComfyUI Manager > > > [!TIP] > > > > Since we are iterating on ComfyUI Manager, the actual latest interface and steps may change significantly > > **1. Enter Node Management Interface** > > Perform the corresponding operations as shown to enter the ComfyUI Manager interface > > **2. Find the Corresponding Custom Node Package** > > You can use the corresponding filters to filter out installed node packages and then perform the corresponding node management > > **3. Perform Version Switching** > > 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. > [tab] Version Management with Git > > **1. Navigate to Directory Using Command Line** > > 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 > ``` > > **2. View Versions Using Git Commands** > > 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. > > **3. Switch to Specified Version** > > 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. > > **4. Switch to Specific Commit Version** > > 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. > > **5. Install Dependencies** > > 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](https://mintcdn.com/dripart/Rig0_LOInmwVbVSB/images/concepts/core-concepts_nodes_manager.png?fit=max\&auto=format\&n=Rig0_LOInmwVbVSB\&q=85\&s=cea0de500828224b23b64cef84a31936) 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](#1-installing-custom-nodes) section of this document. > [!NOTE] > > 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**. Run the following command to clone the ComfyUI-Manager repository: ```bash theme={null} git clone https://github.com/Comfy-Org/ComfyUI-Manager.git ``` 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](https://mintcdn.com/dripart/Rig0_LOInmwVbVSB/images/concepts/core-concepts_nodes_manager.png?fit=max\&auto=format\&n=Rig0_LOInmwVbVSB\&q=85\&s=cea0de500828224b23b64cef84a31936) ## 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. > [card] [Start Developing Custom Nodes](/custom-nodes/overview) > > Learn how to start developing a custom node # Dependencies Source: https://docs.comfy.org/basic-concepts/dependencies Learn what ComfyUI workflows depend on to run: media assets, custom nodes, Python packages, and models. ## 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/Comfy-Org/ComfyUI/blob/master/requirements.txt) file: ```text theme={null} comfyui-frontend-package==1.49.6 comfyui-workflow-templates==0.11.48 comfyui-embedded-docs==0.5.10 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>=2.0.0 filelock av>=17.0.0 comfy-kitchen==0.2.31 comfy-aimdo==0.4.15 requests simpleeval>=1.0.0 blake3 #non essential dependencies: kornia>=0.7.1 spandrel pydantic~=2.0 pydantic-settings~=2.0 PyOpenGL>=3.1.8 comfy-angle ``` 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/Comfy-Org/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 run a second ComfyUI instance in its own Python environment when you need incompatible versions: plugins load into the environment ComfyUI itself runs in, so a separate environment alone does not help. * 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/Comfy-Org/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](https://mintcdn.com/dripart/Rig0_LOInmwVbVSB/images/concepts/core-concepts_dependecies_custom-nodes-manager.png?fit=max\&auto=format\&n=Rig0_LOInmwVbVSB\&q=85\&s=835aa06ad002a4231415f525c0a88b7c) # ComfyUI Links: How Node Connections Work Source: https://docs.comfy.org/basic-concepts/links Learn how links connect nodes in ComfyUI, how to change link render styles, and how the Reroute node keeps complex workflows readable. ## Links connect nodes In ComfyUI, the lines or curves drawn between nodes are called ***links*** (also referred to as ***connections*** or wires). They carry data from one node's output to another node's input, defining the flow of your workflow. Links can be displayed in several visual styles: curves, right angles, straight lines, or hidden entirely. ![Link styles](https://mintcdn.com/dripart/7xbDXwziA_DEy9eI/images/interface/link/link_styles.jpg?fit=max\&auto=format\&n=7xbDXwziA_DEy9eI\&q=85\&s=1d678959a9c5bd80d68231d5b6fed78d) To change the link style, go to **Setup Menu** → **Display (Lite Graph)** → **Graph** → **Link Render Mode**. ![Render mode setting](https://mintcdn.com/dripart/7xbDXwziA_DEy9eI/images/interface/link/render_mode.jpg?fit=max\&auto=format\&n=7xbDXwziA_DEy9eI\&q=85\&s=25d9de19b526f8ec618a9b5e9ed87ed9) You can also temporarily hide all links from the **Canvas Menu**. ![Canvas Menu](https://mintcdn.com/dripart/7xbDXwziA_DEy9eI/images/interface/link/canvas_menu.jpg?fit=max\&auto=format\&n=7xbDXwziA_DEy9eI\&q=85\&s=3925615b50749cbd3f7ed8c0b320d5eb) > [!TIP] > > Showing links is especially useful when learning, sharing, or debugging a workflow. They make the data flow visible at a glance. For finished workflows that aren't meant to be edited, hiding links can reduce visual clutter. ### Reroute node When a workflow becomes complex, link wires can overlap or pass behind nodes, making it hard to read. The **Reroute** node lets you manually redirect a wire through any point in the 2D graph space, keeping the layout clean and legible. ![ComfyUI Reroute node](https://mintcdn.com/dripart/kl0baiKht4v1pyjS/images/interface/link/reroute.jpg?fit=max\&auto=format\&n=kl0baiKht4v1pyjS\&q=85\&s=d713aae29a8454af5a671d07e0c35ab1) ComfyUI also has a built-in native reroute feature in the graph canvas. We recommend using this for new workflows. ![ComfyUI Native Reroute](https://mintcdn.com/dripart/kl0baiKht4v1pyjS/images/interface/link/native_reroute.jpg?fit=max\&auto=format\&n=kl0baiKht4v1pyjS\&q=85\&s=4d0e70a8300bdd79f2d6a623b40306f8) ## Color-coding Every data type in ComfyUI has a distinct color. Node input and output ports, as well as the link wires connecting them, all share this color scheme. **You can only connect ports of the same color**. This ensures type safety across your workflow. ![ComfyUI Node Data Types](https://mintcdn.com/dripart/CGWmMjlFmU7msQ5S/images/concepts/node/data_type.jpg?fit=max\&auto=format\&n=CGWmMjlFmU7msQ5S\&q=85\&s=a2f5203bde87f24afff17ef3cf0bcaa5) | 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) | Gray | | Mesh | Bright green | # ComfyUI Models: Files, Folders, and Loader Nodes Source: https://docs.comfy.org/basic-concepts/models How model files fit into ComfyUI workflows: where they go, how to load them, and common fixes. ## Models in plain terms In ComfyUI, **models** are the weight files that actually run your workflow. They include **checkpoints**, **VAEs**, **LoRAs**, **ControlNets**, and upscalers. The app install is small. These files are **not** included by default. You usually **download them from the web**, place them under `ComfyUI/models/` (or follow a template’s prompts), then choose the file in the right **loader node** (on the canvas, these often appear as nodes whose names start with **Load**). ### Supported models in ComfyUI * **Built-in / first-party coverage is intentionally limited** but grows over time as ComfyUI and the open-source ecosystem evolve. When a model gains first-class support, you will **usually see a new entry in the [workflow template library](/interface/features/template)** that shows the expected graph and model pairing. * **Not every checkpoint or weights file works out of the box.** For **natively supported models and their common companion weights**, keep ComfyUI **[up to date](/installation/update_comfyui)** and confirm the matching workflow exists in the **[template library](/interface/features/template)** before assuming your files are in the wrong place. * **Many other models are enabled through community custom nodes.** Paths, loader nodes, and graph layout can differ from this page’s generic `ComfyUI/models/` guidance. **Always follow each project’s README or docs.** ComfyUI is highly extensible, so implementations vary by author. For installation and troubleshooting, see [How to install custom nodes](/installation/install_custom_node). ## Use models in ComfyUI 1. **Get the files into the right place.** Download from community sites such as [Hugging Face](https://huggingface.co), [Civitai](https://civitai.green), or a project’s page on [GitHub](https://github.com), then put them under `ComfyUI/models/` in the subfolder for that type (for example `checkpoints`, `loras`, `vae`). 2. **Add the matching loader node.** Pick the loader for that model type (checkpoint, LoRA, VAE, etc.). In the node list, titles often begin with **Load**. 3. **Pick the file** in that loader node’s dropdown. 4. **Wire the loader node** into the rest of the graph. If you copied files in by hand while ComfyUI was open, **restart** the app (or refresh as needed) so lists update. ### Expect large downloads A single generative model is often **many gigabytes**. Budget disk space and time when downloading or syncing. ## Beyond the main checkpoint The main diffusion checkpoint does a lot, but many workflows add **smaller helper models**, for example: * **LoRA**: lightweight add-ons tuned for a style, character, or concept * **ControlNet**: extra guidance from edges, depth, pose, etc. * **Inpainting**: fill or replace regions inside an existing image ![auxiliary models](https://mintcdn.com/dripart/Rig0_LOInmwVbVSB/images/concepts/core-concepts_auxiliary-model.png?fit=max\&auto=format\&n=Rig0_LOInmwVbVSB\&q=85\&s=0f49a29f61c23ccd32ec5a15207b8f9c) ## Uninstalling models There is no “uninstall” button in the UI yet. To remove a model, **delete its file** (or files) from the folder under `ComfyUI/models/` where you put it. ## 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 > [tab] Portable/Manual Install > > 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/Comfy-Org/ComfyUI/blob/master/extra_model_paths.yaml.example) > [tab] Comfy Desktop > > If you are using the [Comfy Desktop](/installation/desktop/windows) application, click the capsule menu at the top of the desktop app, then open the **Storage** tab and add your model directories there. The capsule only exists in the desktop app, not when ComfyUI runs in a browser. > > ![Comfy Desktop capsule menu: Storage tab showing model directory settings](https://mintcdn.com/dripart/p_8CHAm1Eb5_A3Ke/images/concepts/models_desktop_storage_tab.png?fit=max\&auto=format\&n=p_8CHAm1Eb5_A3Ke\&q=85\&s=423692fae08989a704da0a4c2143ef3b) > > Or open it directly at: > > > [tab] Windows > > > > ``` > > C:\Users\YourUsername\AppData\Roaming\ComfyUI\extra_models_config.yaml > > ``` > > > [tab] macOS > > > > ``` > > ~/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 ``` > [!WARNING] > > 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/Comfy-Org/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 > [!TIP] > > 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 ``` ## Common issues > [accordion] Does ComfyUI support GGUF format models? > > 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). > [accordion] Why can't I find my model? > > If you've installed a model but can't find it in ComfyUI, try these steps: > > * Verify the model is in the correct location: > > * Default path: `ComfyUI/models/` (e.g. `checkpoints`, `loras`, `vae`) > * For **Comfy Desktop**: Click the capsule menu at the top of the desktop app, then open the **Storage** tab to check your model directories. The capsule only exists in the desktop app, not when ComfyUI runs in a browser. > > ![Comfy Desktop capsule menu: Storage tab showing model directory settings](https://mintcdn.com/dripart/p_8CHAm1Eb5_A3Ke/images/concepts/models_desktop_storage_tab.png?fit=max\&auto=format\&n=p_8CHAm1Eb5_A3Ke\&q=85\&s=423692fae08989a704da0a4c2143ef3b) > * Press the `r` key to refresh node definitions so ComfyUI can detect the model > * Restart ComfyUI > * Ensure the correct model is selected in the loader node ## Want a bit more background? > [accordion] What does “model” mean here? > > Here, a **model** is a data file that encodes what a network learned. It contains enough information to turn inputs (like text and noise) into outputs (like an image). Common examples in image workflows are **diffusion** checkpoints, text/image encoders such as **CLIP**, and **upscalers** like RealESRGAN. > [accordion] Base models and community variants > > Large **base** models from labs and open-source projects are general-purpose. The community often **fine-tunes** or merges them into new checkpoints and LoRAs that look better for a given style, run a bit lighter, or add new behavior. This is similar to picking a favorite checkpoint on Civitai or Hugging Face. # ComfyUI Nodes: Types, Inputs, and Outputs Source: https://docs.comfy.org/basic-concepts/nodes Nodes are ComfyUI's fundamental building blocks: independent Comfy Core or custom modules you connect with links to assemble complex workflows. 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](https://mintcdn.com/dripart/7m9lukFrTCZs7Mhj/images/comfy_core/sampling/k_sampler.png?fit=max\&auto=format\&n=7m9lukFrTCZs7Mhj\&q=85\&s=5bb2412a6e137d0a0b630b14845944e1) 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. > [!NOTE] > > 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](https://mintcdn.com/dripart/CGWmMjlFmU7msQ5S/images/concepts/node/status.jpg?fit=max\&auto=format\&n=CGWmMjlFmU7msQ5S\&q=85\&s=150ab91575a7c9300b7ed20d8026e499) 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](/manager/overview) to find and install them, or follow [How to install custom nodes](/installation/install_custom_node) for other methods ## Connections Between Nodes In ComfyUI, nodes are connected through [links](/basic-concepts/links), allowing data of the same type to flow between different processing units to achieve the final result. ![ComfyUI Node Links](https://mintcdn.com/dripart/CGWmMjlFmU7msQ5S/images/concepts/node/inpaint.jpg?fit=max\&auto=format\&n=CGWmMjlFmU7msQ5S\&q=85\&s=40a62b27aa2f44cb97eae917c8c1f8da) 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](https://mintcdn.com/dripart/CGWmMjlFmU7msQ5S/images/concepts/node/data_type.jpg?fit=max\&auto=format\&n=CGWmMjlFmU7msQ5S\&q=85\&s=a2f5203bde87f24afff17ef3cf0bcaa5) | 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) | gray | | 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](https://mintcdn.com/dripart/CGWmMjlFmU7msQ5S/images/concepts/node/link_nodes.gif?s=06359a20664f48e43763696313a063f9) **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](https://mintcdn.com/dripart/EgZuQyCGLVUEw53Z/images/index/node.jpg?fit=max\&auto=format\&n=EgZuQyCGLVUEw53Z\&q=85\&s=e7ed881cf2c91cc9c48892dd491cae7b) 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