外观
在Mac系统安装ComfyUI
在Mac系统安装ComfyUI,首先需要安装Python环境,然后安装ComfyUI。在官方的仓库对于Mac的版本要求为 Apple Mac silicon(M1 或 M2),需安装近期的 macOS 版本。 这里参考官方文档进行安装。
第一步:克隆ComfyUI仓库代码
使用Git命令行工具,使用以下命令克隆ComfyUI仓库代码:
bash
git clone git@github.com:comfyanonymous/ComfyUI.git
第二步:安装Miniconda3和GPU依赖项
① 下载安装 Miniconda3
在命令行窗口中,输入以下命令下载Miniconda3:
bash
# M 芯片
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh
# x86
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
等待下载完成后,输入以下命令安装:
bash
# M 芯片
sh Miniconda3-latest-MacOSX-arm64.sh
# x86
sh Miniconda3-latest-MacOSX-x86_64.sh
② 使用 Conda 创建环境
bash
conda create -n comfyenv
conda activate comfyenv
③ 安装 GPU 依赖项
bash
conda install pytorch-nightly::pytorch torchvision torchaudio -c pytorch-nightly
第三步:安装所需依赖
在ComfyUI目录中打开终端,然后运行以下命令来安装所有必需的依赖:
bash
cd ComfyUI
pip install -r requirements.txt
启动应用程序
在ComfyUI目录中打开终端,然后运行以下命令来启动应用程序:
bash
cd ComfyUI
python main.py
启动应用程序后,ComfyUI将运行在 http://localhost:8188/
上。