Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI Answers

如何使用Cog-ComfyUI安装并配置ComfyUI工作环境?

2025-09-10 1.8 K

环境搭建四步流程

完整的环境配置包含以下关键操作:

1. 代码获取与初始化

git clone --recurse-submodules https://github.com/fofr/cog-comfyui.git

此命令会克隆主仓库并同时获取ComfyUI子模块,避免后续手动添加依赖。

2. 自定义节点安装

./scripts/install_custom_nodes.py

该脚本会自动处理节点依赖,需注意:

  • 需预先安装Python 3.8+环境
  • 国内用户建议配置镜像源加速下载

3. 容器化部署

sudo cog run -p 8188 bash
cd ComfyUI/
python main.py --listen 0.0.0.0

通过Cog工具启动Docker容器,暴露8188端口供外部访问。关键参数--listen 0.0.0.0允许非本地连接。

4. 权重文件准备

需手动将Stable Diffusion等模型文件放入ComfyUI/models/checkpoints目录,这是工作流正常运行的前提条件。

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish