Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
]
},
"installation/comfyui_portable_windows",
"installation/manual_install"
"installation/manual_install",
"installation/install_custom_node"
]
},
"get_started/first_generation"
Expand Down Expand Up @@ -496,7 +497,8 @@
]
},
"zh-CN/installation/comfyui_portable_windows",
"zh-CN/installation/manual_install"
"zh-CN/installation/manual_install",
"zh-CN/installation/install_custom_node"
]
},
"zh-CN/get_started/first_generation"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
140 changes: 140 additions & 0 deletions installation/install_custom_node.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
---
title: "How to Install Custom Nodes in ComfyUI"
description: "This guide will show you different methods to install custom nodes in ComfyUI"
sidebarTitle: "Install Custom Nodes"
icon: "puzzle-piece"
---

## What are Custom Nodes ?

Custom nodes are extensions for ComfyUI that add new functionality like advanced image processing, machine learning fine-tuning, color adjustments, and more. These community-developed nodes can significantly expand ComfyUI's core capabilities.

<Warning>
Before installing custom nodes, it's important to review them carefully. Since ComfyUI is an open-source project, malicious plugins could potentially exploit custom nodes:
1. Only install custom nodes from trusted authors and those commonly used by the community
2. Understand the plugin's functionality before installing and avoid unknown sources to ensure system security
3. Avoid installing obscure or suspicious plugins - unverified plugins may pose security risks that could lead to system compromise
</Warning>

All custom node installations require completing these two steps:

1. Clone the node code to the `ComfyUI/custom_nodes` directory
2. Install the required Python dependencies

This guide covers three installation methods. Here's a comparison of their pros and cons. While [ComfyUI Manager](https://github.com/Comfy-Org/ComfyUI-Manager) isn't yet part of the core dependencies, it will be in the future. We still provide other installation guides to meet different needs.

| Method | Advantages | Disadvantages |
| ---------------------------- | ------------------------------------------------------------- | ----------------------------------------------------------- |
| **ComfyUI Manager** (Recommended) | 1. Automated installation<br/>2. Dependency handling<br/>3. GUI interface | Cannot directly search for nodes not registered in the registry |
| **Git Clone** | Can install nodes not registered in the registry | 1. Requires Git knowledge<br/>2. Manual dependency handling<br/>3. Installation risks |
| **Repository ZIP Download** | 1. No Git required<br/>2. Manual control | 1. Manual dependency handling<br/>2. No version control<br/>3. Installation risks |

Tip: Before installing custom nodes, check the plugin's README file to understand installation methods, usage, and requirements like specific models, dependency versions, and common issue solutions.

## Method 1: ComfyUI Manager (Recommended)

<Steps>
<Step title="Click the `Manager` button in ComfyUI interface">
![Click ComfyUI Manager](/images/installation/custom_nodes/install-custom-nodes-by-manager-1.jpg)
</Step>
<Step title="Select `Install Custom Nodes`">
![Select Install Custom Nodes](/images/installation/custom_nodes/install-custom-nodes-by-manager-2.jpg)
</Step>
<Step title="Browse the custom nodes list">
<Warning>
Custom nodes listed in ComfyUI Manager aren't necessarily safe. Understand their functionality before installing and ensure you only install trusted plugins and those from popular authors to avoid potential device risks.
</Warning>

![Enter node name in search box](/images/installation/custom_nodes/install-custom-nodes-by-manager-3.jpg)
![Enter node name in search box](/images/installation/custom_nodes/install-custom-nodes-by-manager-4.jpg)
1. Nodes marked with `⚠️` may have dependency conflicts with other plugins
2. Author names marked with `✅` indicate their activity level on Github
3. Potential plugin risks are highlighted in red - ensure plugin safety before installing
</Step>
<Step title="Click the `Install` button for the desired node">
![Click Install button for the node](/images/installation/custom_nodes/install-custom-nodes-by-manager-5.jpg)
Find the node you want to install and click the `Install` button
![Click Install button for the node](/images/installation/custom_nodes/install-custom-nodes-by-manager-6.jpg)
A popup will ask you to choose a version - `nightly` is the latest version, while `latest` is the most recent stable version. Choose based on your needs.
</Step>
<Step title="Wait for dependencies to install and restart ComfyUI">
Manager will automatically install dependencies and prompt you to restart ComfyUI when complete
![Restart ComfyUI and refresh browser after installation](/images/installation/custom_nodes/install-custom-nodes-by-manager-7.jpg)
![Restart ComfyUI and refresh browser after installation](/images/installation/custom_nodes/install-custom-nodes-by-manager-8.jpg)
</Step>
<Step title="Verify successful installation">
Check ComfyUI Manager after restart to confirm the plugin installed successfully and there are no `import failed` errors
![Restart ComfyUI and refresh browser after installation](/images/installation/custom_nodes/install-custom-nodes-by-manager-9.jpg)
</Step>
</Steps>

## Method 2: Manual Installation Using Git

Suitable for new nodes not found in Manager or when specific versions are needed. Requires [Git](https://git-scm.com/) installed on your system.

<Steps>
<Step title="Get the repository URL">
Click the "Code" button on GitHub and copy the HTTPS link
</Step>
<Step title="Navigate to custom_nodes directory">
```bash
cd /path/to/ComfyUI/custom_nodes
```
</Step>
<Step title="Clone the repository">
```bash
git clone [repository URL]
```
</Step>
<Step title="Install dependencies">
Dependencies must be installed in your ComfyUI environment - be careful not to mix with your system environment to avoid contamination
<Tabs>
<Tab title="Windows Portable">
For Windows portable version, install dependencies in the embedded Python environment
```bash
python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\[node directory]\requirements.txt
```
</Tab>
<Tab title="Manual Install">
Install dependencies in your ComfyUI environment
```bash
cd [node directory]
pip install -r requirements.txt
```
</Tab>
</Tabs>
</Step>
<Step title="Restart ComfyUI and refresh browser">
Restart ComfyUI and refresh your browser. Check startup logs for any `import failed` errors
</Step>
</Steps>

## Method 3: ZIP Download Installation
Suitable for users who cannot use Git or Manager

<Warning>
We don't recommend this installation method as it loses version control capabilities
</Warning>

<Steps>
<Step title="Click `Code` → `Download ZIP` on GitHub">
Click `Code` → `Download ZIP` on the GitHub page
![Click Code → Download ZIP on GitHub](/images/installation/custom_nodes/install-custom-nodes-by-zip.jpg)
</Step>
<Step title="Extract the ZIP file">
Extract the downloaded ZIP file
</Step>
<Step title="Copy extracted folder to `ComfyUI/custom_nodes/` directory">
Copy the extracted folder to `ComfyUI/custom_nodes/` directory
</Step>
<Step title="Install dependencies manually (same as Git method step 4)">
Restart ComfyUI and refresh browser
</Step>
<Step title="Verify successful installation">
Check ComfyUI Manager after restart to confirm the plugin installed successfully and there are no `import failed` errors
</Step>
</Steps>

{/* ## Troubleshooting

[To Be Updated] */}
140 changes: 140 additions & 0 deletions zh-CN/installation/install_custom_node.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
---
title: "如何在 ComfyUI 中安装自定义节点"
description: "本部分将指导你如何使用不同的方式来进行 ComfyUI 自定义节点的安装"
sidebarTitle: "安装自定义节点"
icon: "puzzle-piece"
---

## 什么是自定义节点?

自定义节点是ComfyUI的扩展插件,能够增加新功能,如高级图像处理、机器学习微调、颜色调整等。这些节点由社区开发,可显著扩展ComfyUI的基础功能。

<Warning>
在安装自定义节点前,你有必要对自定义节点进行审查,由于 ComfyUI 是一个开源项目,也有可能存在恶意利用自定义节点进行攻击的插件
1. 请只安装来自可信作者和社区常用的自定义节点
2. 在安装前了解插件功能,避免安装不明来源的插件以确保系统安全
3. 避免安装冷门插件和来路不明的插件,未经审核的插件可能存在安全风险,进而导致你的电脑被黑客入侵。
</Warning>

所有的自定义节点安装都需要完成下面的两个步骤:

1. 克隆节点代码到 `ComfyUI/custom_nodes` 目录
2. 安装对应的 Python 依赖

在本文中我们将介绍三种安装方法,下面是对应的优缺点对比,由于目前 [ComfyUI Manager](https://github.com/Comfy-Org/ComfyUI-Manager) 还未正式加入到核心依赖中,但在未来 ComfyUI Manager 将会成为核心依赖的一部分,但本部分的指南仍旧提供了其它安装插件的指南,以便满足你的需求。

| 方法 | 优点 | 缺点 |
| -------------------------- | ------------------------------------------------ | ----------------------------------------------------- |
| **ComfyUI Manager** (推荐) | 1. 自动化安装<br/>2. 依赖处理<br/>3. 图形界面 | 不在 registry 中注册的节点无法通过 Manager 直接搜索到 |
| **Git 克隆** | 可以安装不在 registry 中注册的节点 | 1. 需要Git知识<br/>2. 手动处理依赖<br/>3. 存在安装风险 |
| **代码仓库 ZIP 下载** | 1. 无需Git<br/>2. 手动处理一切 | 1. 需要手动处理依赖<br/>2. 无版本控制<br/>3. 存在安装风险 |

提示: 在安装自定义节点前,请先查看插件的 README 文件,了解插件的安装方法和使用方法,有些插件有对特定的包和环境有要求,比如对应的模型、依赖的版本、常见问题解决等

## 方法一:ComfyUI Manager(推荐)

<Steps>
<Step title="点击ComfyUI界面的 `Manager` 按钮">
![点击 ComfyUI Manager](/images/installation/custom_nodes/install-custom-nodes-by-manager-1.jpg)
</Step>
<Step title="选择 `Install Custom Nodes`">
![选择 Install Custom Nodes](/images/installation/custom_nodes/install-custom-nodes-by-manager-2.jpg)
</Step>
<Step title="查看自定义节点列表">
<Warning>
使用 ComfyUI Manager 安装自定义节点时,在列表中的自定义节点并不代表其是安全的,请在安装前了解其功能和作用,确保只安装可信插件和热门作者的自定义节点,否则将会给你的设备带来潜在风险
</Warning>

![在搜索框中输入节点名称](/images/installation/custom_nodes/install-custom-nodes-by-manager-3.jpg)
![在搜索框中输入节点名称](/images/installation/custom_nodes/install-custom-nodes-by-manager-4.jpg)
1. 如果有标记`⚠️`的节点,代表其可能与其它一些插件存在依赖冲突
2. 作者名称标注为`✅`的节点,代表对应作者在 Github 的活跃度
3. 对于插件可能存在的风险行为,会在列表中使用红色字段提醒,请在确保插件安全后再进行安装
</Step>
<Step title="点击对应节点的 `Install` 按钮">
![点击对应节点的 `Install` 按钮](/images/installation/custom_nodes/install-custom-nodes-by-manager-5.jpg)
找到需要安装的节点,点击`Install`按钮
![点击对应节点的 `Install` 按钮](/images/installation/custom_nodes/install-custom-nodes-by-manager-6.jpg)
弹窗会提示要求选择版本,对应的 `nightly` 版本为最新版本,`latest` 版本为最新稳定版本,请根据你的需求选择版本
</Step>
<Step title="等待依赖安装完成后重启ComfyUI">
点击安装后 Manager 会自动完成依赖的安装,并会在安装完成后提示你重启 ComfyUI
![安装完成后重启ComfyUI并刷新浏览器](/images/installation/custom_nodes/install-custom-nodes-by-manager-7.jpg)
![安装完成后重启ComfyUI并刷新浏览器](/images/installation/custom_nodes/install-custom-nodes-by-manager-8.jpg)
</Step>
<Step title="检查插件是否安装成功">
重启后在 ComfyUI Manager 中检查对应的插件是否安装成功, 是否出现`import failed`的错误提示
![安装完成后重启ComfyUI并刷新浏览器](/images/installation/custom_nodes/install-custom-nodes-by-manager-9.jpg)
</Step>
</Steps>

## 方法二:使用 Git 进行安装手动安装

适用于Manager中找不到的新节点或需要特定版本时, 需要你的系统中已经安装好了 [Git](https://git-scm.com/)

<Steps>
<Step title="获取仓库URL">
在GitHub页面点击"Code"按钮复制HTTPS链接
</Step>
<Step title="进入custom_nodes目录">
```bash
cd /path/to/ComfyUI/custom_nodes
```
</Step>
<Step title="克隆仓库">
```bash
git clone [仓库URL]
```
</Step>
<Step title="安装依赖">
安装依赖需要安装到对应的 ComfyUI 环境中,请注意不要混淆到你的系统环境, 否则可能会导致你的系统环境污染
<Tabs>
<Tab title="Windows便携版">
在 Windows 便携版中, 依赖需要安装到对应的嵌入式 Python 环境中
```bash
python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\[节点目录名]\requirements.txt
```
</Tab>
<Tab title="手动安装">
在你的 ComfyUI 环境中安装依赖
```bash
cd [节点目录名]
pip install -r requirements.txt
```
</Tab>
</Tabs>
</Step>
<Step title="重启ComfyUI并刷新浏览器">
重启ComfyUI并刷新浏览器, 检查对应的插件是否安装成功, 在启动日志界面是否出现`import failed`的错误提示
</Step>
</Steps>

## 方法三:ZIP下载安装
适用于无法使用 Git 或 Manager 安装的用户

<Warning>
我们不是非常推荐使用这种方式来进行安装,因为这种安装方式会丢失
</Warning>

<Steps>
<Step title="在GitHub页面点击 `Code` → `Download ZIP`">
在GitHub页面点击 `Code` → `Download ZIP`
![在GitHub页面点击 `Code` → `Download ZIP`](/images/installation/custom_nodes/install-custom-nodes-by-zip.jpg)
</Step>
<Step title="解压ZIP文件">
解压ZIP文件
</Step>
<Step title="将解压后的文件夹复制到 `ComfyUI/custom_nodes/` 目录">
将解压后的文件夹复制到 `ComfyUI/custom_nodes/` 目录
</Step>
<Step title="手动安装依赖项(同Git方法的第4步)">
重启ComfyUI并刷新浏览器
</Step>
<Step title="检查插件是否安装成功">
重启后在 ComfyUI Manager 中检查对应的插件是否安装成功, 是否出现`import failed`的错误提示
</Step>
</Steps>

{/* ## 常见问题排查

[To Be Updated] */}