Documentation Index Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
Use this file to discover all available pages before exploring further.
ComfyUI Portable(便携版) 是一个独立封装完整的 ComfyUI Windows 版本,内部已经整合了 ComfyUI 运行所需的独立的 Python(python_embeded) ,只需要解压即可使用。本部分指南将引导你完成对应的安装。
下载 ComfyUI Portable(便携版)
请根据你的显卡类型选择对应的下载包。ComfyUI Portable 为不同硬件提供了独立的安装包。
Nvidia 显卡
AMD 显卡
Intel 显卡
Nvidia 显卡标准版
Nvidia GPU (CUDA 13.0, Python 3.13) 适用于现代 Nvidia 显卡(RTX 系列)
Nvidia GPU (CUDA 12.6, Python 3.12) 支持 Nvidia 10 系列及更早的显卡
下载后使用 7-ZIP 解压,解压后文件结构如下: ComfyUI_windows_portable
├── 📂ComfyUI // ComfyUI 程序主体
├── 📂python_embeded // 独立的 Python 环境
├── 📂update // 用于升级便携版安装包的批处理脚本
├── README_VERY_IMPORTANT.txt // 英文版本的 ComfyUI 便携版使用说明
├── run_cpu.bat // 双击启动 ComfyUI(仅支持 CPU)
└── run_nvidia_gpu.bat // 双击启动 ComfyUI(Nvidia 显卡)
双击 run_nvidia_gpu.bat 启动 ComfyUI。 AMD 显卡便携版
AMD GPU 下载适用于 AMD 显卡的便携版(ROCm)
下载后使用 7-ZIP 解压,解压后文件结构如下: ComfyUI_windows_portable_amd
├── 📂ComfyUI // ComfyUI 程序主体
├── 📂python_embeded // 独立的 Python 环境
├── 📂update // 用于升级便携版安装包的批处理脚本
├── README_VERY_IMPORTANT.txt // 英文版本的 ComfyUI 便携版使用说明
├── run_cpu.bat // 双击启动 ComfyUI(仅支持 CPU)
└── run_amd_gpu.bat // 双击启动 ComfyUI(AMD 显卡)
双击 run_amd_gpu.bat 启动 ComfyUI。 Intel 显卡便携版
Intel GPU 下载适用于 Intel 显卡的便携版
下载后使用 7-ZIP 解压,解压后文件结构如下: ComfyUI_windows_portable_intel
├── 📂ComfyUI // ComfyUI 程序主体
├── 📂python_embeded // 独立的 Python 环境
├── 📂update // 用于升级便携版安装包的批处理脚本
├── README_VERY_IMPORTANT.txt // 英文版本的 ComfyUI 便携版使用说明
├── run_cpu.bat // 双击启动 ComfyUI(仅支持 CPU)
└── run_intel_gpu.bat // 双击启动 ComfyUI(Intel 显卡)
双击 run_intel_gpu.bat 启动 ComfyUI。
下载并解压后,你会看到对应下图所示的命令的运行
当你看到类似图片中的
To see the GUI go to: http://127.0.0.1:8188
此时你的 ComfyUI 服务已经启动,正常情况下 ComfyUI 会自动打开你的默认浏览器并访问 http://127.0.0.1:8188 地址,如果没有自动打开,请手动打开浏览器并访问该地址。
使用过程中请不要关闭对应的命令行窗口,否则 ComfyUI 将会停止运行
添加外部模型路径
如果你想要在 ComfyUI/models 之外管理你的模型文件,可能出于以下原因:
你有多个 ComfyUI 实例,你想要让这些实例共享模型文件,从而减少磁盘占用
你有多个不同的类型的 GUI 程序,如:WebUI, 你想要他们共用模型文件
模型文件无法被识别或读取到
我们提供了通过 extra_model_paths.yaml 配置文件来添加额外模型搜索路径的方法。
不同 ComfyUI 版本配置文件位置
Portable 及自部署
ComfyUI Desktop
对于便携版 和手动安装 的 ComfyUI版本,你可以在 ComfyUI 的根目录下找到 extra_model_paths.yaml.example 的示例文件 ComfyUI/extra_model_paths.yaml.example
复制并重命名为 extra_model_paths.yaml 来使用, 并保持在 ComfyUI 的根目录下, 路径应该是 ComfyUI/extra_model_paths.yaml 你也可以在 这里 找到配置示例文件 如果你使用的是 ComfyUI 桌面应用程序,你可以参考下图打开额外模型的配置文件: 或者通过下面的位置打开: C:\Users\YourUsername\AppData\Roaming\ComfyUI\extra_models_config.yaml
~/Library/Application Support/ComfyUI/extra_models_config.yaml
对应的配置文件不应该被改变
配置示例
比如,你需要额外让 ComfyUI 识别的模型文件位于下面的文件夹:
📁 YOUR_PATH/
├── 📁models/
| ├── 📁 loras/
| │ └── xxxxx.safetensors
| ├── 📁 checkpoints/
| │ └── xxxxx.safetensors
| ├── 📁 vae/
| │ └── xxxxx.safetensors
| └── 📁 controlnet/
| └── xxxxx.safetensors
那么你可以进行如下的配置来让 ComfyUI 识别到你设备上的模型路径
my_custom_config:
base_path: YOUR_PATH
loras: models/loras/
checkpoints: models/checkpoints/
vae: models/vae/
controlnet: models/controlnet/
或者使用
my_custom_config:
base_path: YOUR_PATH/models/
loras: loras
checkpoints: checkpoints
vae: vae
controlnet: controlnet
对于桌面版,请在原有配置路径下新增配置,而不覆盖掉安装过程中自动生成的路径配置,请在修改前备份对应的文件,这样在你配置错误时可以及时恢复
或者你也可以参考默认的 extra_model_paths.yaml.example 来配置,保存之后, 需要 重启 ComfyUI 才能生效。
下面是完整的原始的配置配置示例:
#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
添加额外自定义节点路径
除了添加外部模型之外,你同样可以添加不在 ComfyUI 默认路径下的自定义节点路径
请注意,这并不会改变自定义节点的默认安装路径,只是在启动 ComfyUI 时会增加额外的路径搜索,你仍旧需要在对应的环境中完成自定义节点的依赖的安装,来保证其运行环境的完整性。
下面是一个简单的配置示例(Mac 系统),请根据你的实际情况进行修改,并新增到对应的配置文件中,保存后需要 重启 ComfyUI 才能生效:
my_custom_nodes :
custom_nodes : /Users/your_username/Documents/extra_custom_nodes
进行第一次图片生成
安装成功后,你可以参考访问下面的章节,开始你的 ComfyUI 之路。
进行第一次图片生成 本教程将引导你完成第一次的模型安装以及对应的文本到图片的生成
其它 ComfyUI 便携版相关说明
1. ComfyUI 便携版升级
你可以使用 update 文件夹下的相关批处理命令完成 ComfyUI 便携版的升级
ComfyUI_windows_portable
└─ 📂update
├── update.py
├── update_comfyui.bat // 更新 ComfyUI 到最新的 Commit 版本
├── update_comfyui_and_python_dependencies.bat // 请仅在你的运行环境存在问题时使用
└── update_comfyui_stable.bat // 更新 ComfyUI 为最新的 stable 版本
2. ComfyUI 便携版设置局域网访问
如果你的 ComfyUI 运行在局域网内,想要其它的设备也可以访问到 ComfyUI,你可以通过记事本修改对应的 .bat 文件(如 run_nvidia_gpu.bat、run_amd_gpu.bat 或 run_cpu.bat)来完成配置,主要通过添加 --listen 来添加监听地址
下面的示例是添加了 --listen 参数的 run_nvidia_gpu.bat 文件命令
.\python_embeded\python.exe -s ComfyUI\main.py --listen --windows-standalone-build
pause
当启用 ComfyUI 后您会发现最后的运行地址会变为
Starting server
To see the GUI go to: http://0.0.0.0:8188
To see the GUI go to: http://[::]:8188
你可以通过 WIN + R 输入cmd 打开命令行,输入 ipconfig 来查看你的局域网 IP 地址,然后在其它设备上输入 http://你的局域网IP:8188 来访问 ComfyUI