跳转至

手动安装 ComfyUI

在windows和macOS下可以直接通过 Comfyui提供的安装包进行安装,但如果您在Linux服务器上就需要手动安装,可以参考以下步骤。

安装ComfyUI

前置要求

  1. 确保已安装以下软件:
    • Python 3.10 或更高版本
    • Git
  2. 安装必要的依赖工具:
    1
    pip install --upgrade pip setuptools wheel
    

安装步骤

  1. 克隆 ComfyUI 仓库
    打开终端并运行以下命令:

    1
    2
    3
    git clone https://github.com/comfyanonymous/ComfyUI.git 或
    git clone --depth=1 https://github.com/crystian/ComfyUI-Crystools.git (或者使用该指令,拉取速度更快)
    cd ComfyUI
    

  2. 安装依赖
    在项目目录下运行以下命令安装所需依赖:

    1
    2
    pip install -r requirements.txt 或
    uv pip install -r requirements.txt (安装过uv指令的话,速度更快)
    

  3. 运行 ComfyUI
    执行以下命令启动 ComfyUI:

    1
    2
    python main.py 或
    nohup python3 -u main.py --listen 0.0.0.0 > nohup.out &
    

  4. 访问界面
    打开浏览器,访问 http://localhost:8188 即可使用 ComfyUI。

ComfyUI

当然也可以通过以下命令直接完成安装:

1
2
pip install comfy-cli
comfy install

以上步骤完成后,您应该可以成功运行 ComfyUI。

配置基础插件ComfyUI

ComfyUI的很多功能离不开插件的支持,这里以ComfyUI-Manager 和 ComfyUI-Crystools 是 ComfyUI 的两个常用插件为例。

  • ComfyUI-Manager: ComfyUI-Manager 是一个插件管理工具,用于简化 ComfyUI 插件的安装、更新和管理。它可以帮助用户快速安装和维护多个插件,避免手动操作的繁琐。
  • ComfyUI-Crystools : ComfyUI-Crystools 是一个扩展工具集,提供了额外的功能和实用工具,用于增强 ComfyUI 的功能,例如数据处理、可视化等。

进入 ComfyUI/custom_nodes 目录,执行如下命令:

安装方法:

1
2
3
4
5
6
git clone https://github.com/ltdrdata/ComfyUI-Manager comfyui-manager
cd comfyui-manager
pip install -r requirements.txt  uv pip install -r requirements.txt
git clone https://github.com/crystian/ComfyUI-Crystools.git
cd ComfyUI-Crystools
pip install -r requirements.txt

注:在安装完 ComfyUI-Manager 后,您可能需要重启 ComfyUI 以使插件生效,其他插件都可以在 web 界面中安装。

捐赠本站(Donate)

weixin_pay
如您感觉文章有用,可扫码捐赠本站!(If the article useful, you can scan the QR code to donate))