Conda 安装纯净版ComfyUI
网上有很多整合包, 我个人喜欢纯净版, 自已搭建
1 拉代码
git clone https://github.com/comfyanonymous/ComfyUI
如果没有装过git,下载安装:
https://git-scm.com/
https://git-lfs.com/
2 创建环境
cd ComfyUI
conda create -n ComfyUI python=3.11
conda activate ComfyUI
3 NVIDIA卡装pytorch, 各种包
nvcc --version
查看版本号, 要是运行不了来这里下载安装:https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=11&target_type=exe_local
关掉requirements.txt上的torch
查看显卡型号:cu121
安装torch: https://pytorch.org/get-started/locally/
pip install -r requirements.txt
conda list |grep torch #查看是否cuda
pip install torch==2.1.2+cu121 torchaudio==2.1.2+cu121 torchvision==0.16.2+cu121 --extra-index-url https://download.pytorch.org/whl/cu121 xformers==0.0.23.post1 tensorboard==2.15.1 tensorflow==2.15.0
#--force-reinstall
4 启动
python main.py --windows-standalone-build #--cpu
启动参数:https://www.yizz.cn/3943.html
启动时可能有各种问题,看控制台的错误提示
5 加节点,加模型
custom_nodes
models
运行节点时可能缺包,要监控控制台
参考:
https://blog.csdn.net/qq_28171389/article/details/143712138
https://blog.csdn.net/qq_28171389/article/details/143820731