Nuullll / ipex-sd-docker-for-arc-gpu

Docker for Intel Arc GPU: Intel Pytorch EXtension + Stable Diffusion web ui
http://blog.nuullll.com/ipex-sd-docker-for-arc-gpu/
41 stars 7 forks source link

[Issue] Error when installing torch during launching webui server #11

Closed citratecycle closed 1 year ago

citratecycle commented 1 year ago

Log of webui.sh

Create and activate python venv
Launching launch.py...
10:51:57-176029 INFO     Starting SD.Next
10:51:57-180989 INFO     Python 3.10.6 on Linux
10:51:57-243140 INFO     Version: 558b71f0 Fri Jul 14 02:21:52 2023 +0300
10:51:57-284934 INFO     Intel OneAPI Toolkit detected
10:51:57-287251 INFO     Installing package: torch==1.13.0a0 torchvision==0.14.1a0
                         intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu
10:51:58-547230 ERROR    Error running pip: install --upgrade torch==1.13.0a0 torchvision==0.14.1a0
                         intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu
10:51:58-549685 ERROR    Could not load torch: No module named 'torch'

Workarounds tried

I modified webui.sh to bash so that the container can start normally without executing the webui script. Then I attached to the container and try to install coresponding packages manually. I tried using pip directly and using python -m as Intel's doc, both failed and reports similar errors.

# pip3 install torch==1.13.0a0 torchvision==0.14.1a0 intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu
Looking in links: https://developer.intel.com/ipex-whl-stable-xpu
ERROR: Could not find a version that satisfies the requirement torch==1.13.0a0 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1)
ERROR: No matching distribution found for torch==1.13.0a0
# python -m pip install torch==1.13.0a0+git6c9b55e torchvision==0.14.1a0 intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu
Looking in links: https://developer.intel.com/ipex-whl-stable-xpu
ERROR: Could not find a version that satisfies the requirement torch==1.13.0a0+git6c9b55e (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1)
ERROR: No matching distribution found for torch==1.13.0a0+git6c9b55e

I also tried to replace the link to Intel's torch with https://www.intel.com/content/dam/develop/external/us/en/documents/ipex/whl-stable-xpu.html, which is the address after redirection, and the case is the same.

Env

OS: Windows 11 Pro 22621.1992 WSL2: Ubuntu 22.04.2 LTS (GNU/Linux 5.10.16.3-microsoft-standard-WSL2 x86_64) webui version: Version: 558b71f0 Fri Jul 14 02:21:52 2023 +0300 hardware: i5-13400F + Arc A750 8G

有没有交流群啊,沟通起来似乎可以快捷一点

citratecycle commented 1 year ago

Update: I manually downloaded torch-1.13.0a0%2Bgit6c9b55e-cp310-cp310-linux_x86_64.whl, torchvision-0.14.1a0%2B5e8e2f1-cp310-cp310-linux_x86_64.whl, and intel_extension_for_pytorch-1.13.120%2Bxpu-cp310-cp310-linux_x86_64.whl and put them into sd-webui/torch_files. Then I modified line 318 of installer.py to -f /sd-webui/torch_files/. Well... it seems to work but is not very elegant...

Nuullll commented 1 year ago

I encountered the same error on Thursday. Feels like Intel was blocking/restricting download requests of certain proxies… Maybe I should also provide an “offline” version of the image.

qq交流群 558074047