安装conda
conda下载和安装
mkdir -p ~/data/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/data/miniconda3/miniconda.sh
bash ~/data/miniconda3/miniconda.sh -b -u -p ~/data/miniconda3
rm -rf ~/data/miniconda3/miniconda.sh
conda配置
~/data/miniconda3/bin/conda init bash
conda禁止自动激活base
conda config --set auto_activate_base false
安装ComfyUI
下载
cd ~/data
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ~/data/ComfyUI
conda create -p pyenv python=3.11
conda activate ./pyenv
安装基础依赖
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118
pip install -r requirements.txt
下载模型
cd ~/data/ComfyUI/models/checkpoints
curl https://liblibai-online.vibrou.com/web/model/7c819b6d13663ed720c2254f4fe18373107dfef2448d337913c8fc545640881e.safetensors?attname=majicMIX%20realistic%20%E9%BA%A6%E6%A9%98%E5%86%99%E5%AE%9E_v7.safetensors -o majicMIX_realistic_v7.safetensors
curl https://liblibai-online.vibrou.com/web/model/3a9473842c64f01162e10c6d4df24638/d196f0825b7394aa2010ef13706315633e9023461cf76863e14024d7b577923c.safetensors?attname=%E5%A2%A8%E5%B9%BD%E4%BA%BA%E9%80%A0%E4%BA%BA_v1080-none.safetensors -o 墨幽人造人_v1080-none.safetensors
启动
cd ~/data/ComfyUI
python main.py --listen 0.0.0.0
配置huggingface镜像
安装依赖
pip install -U huggingface_hub
设置环境变量
export HF_ENDPOINT=https://hf-mirror.com
安装ComfyUI-Manager
cd ~/data/ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager.git
pip install onnxruntime-gpu
pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
正文完
可以使用微信扫码关注公众号(ID:xzluomor)