ComfyUI学习
ComfyUI
# 安装
# 下载
在解压压缩包后,CMD运行run_cpu.bat,即打开服务,看到前端界面。
\ComfyUI_windows_portable>run_cpu
Linux 安装: 环境配置:Ubuntu20.04, Python 3.10, Pytorch 2.0.0, CUDA 11.7, cuDNN 8, JupyterLab, CloudStudio
# 大模型
- 下载大模型stable-diffsion (opens new window),
- 放到\ComfyUI_windows_portable\ComfyUI\models\checkpoints
# Cuda
下载英伟达的Cuda 官方下载 (opens new window)
- cmd验证cuda安装情况:
nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Wed_Aug_14_10:26:51_Pacific_Daylight_Time_2024
Cuda compilation tools, release 12.6, V12.6.68
Build cuda_12.6.r12.6/compiler.34714021_0
2
3
4
5
6
# 工具
# 社区
AI 社区 huggingface (opens new window)
# Manager
- 下载
ComfyUI_windows_portable/ComfyUI/custom_nodes $ git clone https://github.com/ltdrdata/ComfyUI-Manager.git
- 重启comfyui,看到manager按钮
# 命令行 Comfy-Cli
Comfy-Cli仓库 (opens new window)
\Python\Python312\Scripts>pip install comfy-cli
Collecting comfy-cli
Downloading comfy_cli-1.1.7-py3-none-any.whl.metadata (10 kB)
>comfy install
warn: The recent workspace None is not a valid ComfyUI path.
Do you agree to enable tracking to improve the application? [y/N]: y
warn: The recent workspace None is not a valid ComfyUI path.
? What GPU do you have? nvidia
Install from https://github.com/comfyanonymous/ComfyUI to C:\Users\xx\Documents\comfy\ComfyUI? [y/N]: y
Installing from 'https://github.com/comfyanonymous/ComfyUI' to 'C:\Users\xx\Documents\comfy\ComfyUI'
2
3
4
5
6
7
8
9
10
# Node节点
# 生成3D模型
# ComfyUI-3D-Pack
ComfyUI-3D-Pack (opens new window) 各种3d生成的集合
github上说需要以下依赖
- Windows 10/11, Ubuntu 22.04
- Python 3.10/3.11/3.12
- CUDA 12.1/11.8
- torch 2.3.0+cu121/cu118,
- torchvision 0.18.0+cu121/cu118
后来运行install.py发现需要的是
- torch2.4.0
- torchaudio-2.4.0
- torchvision-0.18.0
根据视频https://www.youtube.com/watch?v=RjuoLMCpvbI操作
"xxxx\python_embeded\python.exe" -v
查看python版本: Python 3.12.7,可以使用nvcc -V
查看cuda版本,是cuda 12.1可以使用"xxxx\python_embeded\python.exe" -m pip list
查看版本- torch 2.5.0+cu124
- torchaudio 2.5.0+cu124
- torchvision 0.20.0+cu124
重新装这三个依赖
- 到pytorch下载需要的版本:https://download.pytorch.org/whl/torchvision
xxx\ComfyUI3D\python_embeded\python.exe" -m pip install "xxx\torch-2.4.0+cu121-cp312-cp312-win_amd64.wh" xxx\ComfyUI3D\python_embeded\python.exe" -m pip install "xxx\torchaudio-2.4.0+cpu-cp312-cp312-win_amd64.whl" xxx\ComfyUI3D\python_embeded\python.exe" -m pip install "xxx\torchvision-0.18.0+cpu-cp312-cp312-win_amd64.whl" xxx\ComfyUI3D\python_embeded\python.exe" -m pip install "xxx\xformers-0.0.27.post2-cp312-cp312-win_amd64.whl"
1
2
3
4下载
ComfyUI_windows_portable/ComfyUI/custom_nodes $ git clone https://github.com/ltdrdata/ComfyUI-Manager.git
\xxxx\ComfyUI\custom_nodes\ComfyUI-3D-Pack>"C:\Users\fanze\Documents\2_Software\xxxx\python_embeded\python.exe" install.py
build出错:[Comfy3D] [ERROR] Comfy3D install failed: Dependency installation has failed.半自动安装build https://github.com/MrForExample/ComfyUI-3D-Pack/blob/main/_Pre_Builds/README.md
需要同时有cuda 12.1和11.8两个版本安装好
安装Download Miniconda
# Unique3D
Unique3D (opens new window) ComfyUI-Unique3D (opens new window)
使用步骤:
git clone https://github.com/jtydhr88/ComfyUI-Unique3D.git --depth 1
安装到\ComfyUI_windows_portable\ComfyUI\custom_nodes- (Windows) Download the trition whl from https://huggingface.co/madbuda/triton-windows-builds, because it uses python 311, so download whl build for py311 and place it under ComfyUI-Unique3D folder.
- (Windows) run install_windows_portable_win_py311_cu121.bat inside ComfyUI-Unique3D, answer Y while asking remove something
- 错误:
ERROR: triton-2.1.0-cp311-cp311-win_amd64.whl is not a supported wheel on this platform.
- 下载安装 python3.11 https://www.python.org/downloads/windows/
- 指定install_windows_portable_win_py311_cu121.bat文件中python3.11的位置
- Download the weights from huggingface spaces or Tsinghua Cloud Drive, and extract it to ckpt/*.
# Tripo
ComfyUI-Tripo (opens new window) TripoSR (opens new window)
使用步骤:
- 安装,可以通过ComfyUI-Manager直接安装ComfyUI-Tripo
- 需要 key