ComfyUI安装教程

📅 2025-02-05 ⏱ 阅读约10分钟 较高难度 AI绘画
广告位 - 百度联盟

一、安装ComfyUI

1.1 环境要求

与SD WebUI类似,ComfyUI需要:

  1. Python 3.10.x
  2. PyTorch(带CUDA支持)
  3. NVIDIA GPU(推荐6GB+显存)
  4. Git

1.2 标准安装

# 克隆ComfyUI
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI

# 安装PyTorch(CUDA版本)
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

# 安装其他依赖
pip install -r requirements.txt

1.3 快速安装(推荐新手)

# 使用ComfyUI官方便携版(自带Python环境)
# 从GitHub Releases下载便携版
# https://github.com/comfyanonymous/ComfyUI/releases

# 下载后解压,直接运行 run_nvidia_gpu.bat
💡 提示:如果你已经安装了SD WebUI,可以共用同一个Python环境,避免重复安装PyTorch。

二、启动ComfyUI

# 使用NVIDIA GPU启动
run_nvidia_gpu.bat

# 使用CPU启动(速度较慢)
run_cpu.bat

# 使用AMD GPU启动(ROCm)
run_amd_gpu.bat

启动后浏览器访问 http://127.0.0.1:8188,即可看到ComfyUI的节点编辑器界面。

三、常用插件:ComfyUI Manager

3.1 安装ComfyUI Manager

cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager.git
cd ComfyUI-Manager
pip install -r requirements.txt

3.2 使用ComfyUI Manager

安装ComfyUI Manager后,重启ComfyUI,你会在界面上看到"Manager"按钮:

  1. 安装自定义节点:点击 Manager → Install Custom Nodes,浏览并安装需要的节点插件
  2. 更新节点:点击 Manager → Update All,一键更新所有已安装的节点
  3. 加载工作流:可以导入社区分享的JSON工作流文件
💡 推荐插件:

广告位 - 百度联盟