-
AMD/Intel GPU 均可
-
经测试在 4800H 的核显上能跑(比纯 CPU 快,比 Linux 下 ROCm 慢)
-
-
建议使用 Windows 11
-
建议先更新 WSL2 内核: https://apps.microsoft.com/detail/9P9TQF7MRM4R
-
或运行 powershell:
wsl --update
-
-
本文使用 WSL2 openSUSE Tumbleweed: https://apps.microsoft.com/detail/9MSSK2ZXXN11
-
在微软商店安装后,在开始菜单中找到 openSUSE Tumbleweed 并打开,按提示完成初始配置即可
-
也可以运行 powershell 命令安装:
wsl --install openSUSE-Tumbleweed
-
Note
|
因为 DirectML 支持版本所限,使用 Python 3.10 |
sudo zypper install --no-confirm \
python310 python310-pip \
python310-wheel python310-setuptools python310-numpy \
git aria2 \
Mesa-libGL1 libgthread-2_0-0
sudo zypper install --no-confirm \
python310-devel python310-Cython \
gcc-c++ cmake
PIP 代理
sudo pip3.10 config set global.proxy http://host.docker.internal:1081
sudo pip3.10 install --upgrade pip
临时系统代理
export HTTP_PROXY=http://host.docker.internal:1081
export HTTPS_PROXY=$HTTP_PROXY
export http_proxy=$HTTP_PROXY
export https_proxy=$HTTP_PROXY
export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7,
10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16"
export no_proxy=$NO_PROXY
sudo pip3.10 install --break-system-packages \
torch-directml torchvision torchaudio \
--index-url https://download.pytorch.org/whl/cpu \
--extra-index-url https://pypi.org/simple
sudo pip3.10 install --break-system-packages \
-r https://raw.githubusercontent.com/comfyanonymous/ComfyUI/master/requirements.txt \
-r https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/requirements.txt
sudo pip3.10 install --break-system-packages \
-r https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/main/requirements.txt \
--extra-index-url https://download.pytorch.org/whl/cpu
git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules \
https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
cd custom_nodes
git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules \
https://github.com/ltdrdata/ComfyUI-Manager.git
cd ..
python3.10 main.py --listen --port 8188 --directml
Tip
|
如果显存小于 4G,添加参数: --lowvram |
Note
|
更多 ComfyUI 参数: https://github.com/comfyanonymous/ComfyUI/blob/master/comfy/cli_args.py |