mac 安装 comfyui | python 技术论坛-江南app体育官方入口
步骤已最简化,不需要安装 conda
环境准备(homebrew及相关依赖包)
cd ~
#安装homebrew
/bin/bash -c "$(curl -fssl https://raw.githubusercontent.com/homebrew/install/head/install.sh)"
#安装相关依赖
brew install cmake protobuf rust python@3.10 git wget
新建一个 shll 脚本,install.sh
#!/bin/bash
#创建虚拟环境
cd ~
python3 -m venv cf
#激活虚拟环境
source cf/bin/activate
#升级pip
pip install --upgrade pip
#安装依赖
pip install torch torchvision torchaudio
#克隆comfyui代码并安装依赖
git clone https://github.com/comfyanonymous/comfyui
cd comfyui
pip install -r requirements.txt
pip uninstall numpy
pip install numpy==1.26.4
#安装插件管理器及汉化插件
cd ~/comfyui/custom_nodes
git clone https://github.com/ltdrdata/comfyui-manager.git
cd comfyui-manager && pip install -r requirements.txt
pip install setuptools
cd ..
git clone https://github.com/aigodlike/aigodlike-comfyui-translation.git
echo "comfyui部署完成!"
执行脚本
bash install.sh
- 下载模型 (考虑国内网络环境,此处使用镜像站)
wget -p ~/comfyui/models/checkpoints https://hf-mirror.com/larryaidraw/v1-5-pruned-emaonly/resolve/main/v1-5-pruned-emaonly.ckpt
启动 comfyui
cd ~
source cf/bin/activate && cd comfyui && python main.py --auto-launch --listen --dont-upcast-attention --output-directory ~/desktop
本作品采用《cc 协议》,转载必须注明作者和本文链接
微信订阅号:nick同学