Closed RoyalCyan closed 1 year ago
Install the drivers. Here is a guide: https://www.technopat.net/sosyal/konu/using-stable-diffusion-webui-with-intel-arc-gpus.2593077
Also why do you have modified files?
'installer.py', 'launch.py', 'webui.py'
Install the drivers. Here is a guide: https://www.technopat.net/sosyal/konu/using-stable-diffusion-webui-with-intel-arc-gpus.2593077
Also why do you have modified files?
'installer.py', 'launch.py', 'webui.py'
Do I still have to install the drivers if I have kernel 6.2? In the guide it says to either install them manually or be on kernel 6.2+.
I truly have no idea why 'installer.py', 'launch.py', 'webui.py'
are modified. I haven't touched them.
Do I still have to install the drivers if I have kernel 6.2? In the guide it says to either install them manually or be on kernel 6.2+.
That's for the graphics driver only. You have to install the compute drivers no matter what kernel you have.
I truly have no idea why
'installer.py', 'launch.py', 'webui.py'
are modified. I haven't touched them.
Undo the modifications with git reset --hard
Do I still have to install the drivers if I have kernel 6.2? In the guide it says to either install them manually or be on kernel 6.2+.
That's for the graphics driver only. You have to install the compute drivers no matter what kernel you have.
I truly have no idea why
'installer.py', 'launch.py', 'webui.py'
are modified. I haven't touched them.Undo the modifications with
git reset --hard
I did all of that, installed and patched drivers. Now it seems that OneAPI is loading correctly, but there is a different error now. Here is the terminal output:
rudolf@Ruby:~/AI/automatic$ ./webui.sh --use-ipex
Create and activate python venv
Setting OneAPI environment
:: initializing oneAPI environment ...
webui.sh: BASH_VERSION = 5.2.15(1)-release
args: Using "$@" for setvars.sh arguments: --use-ipex
:: compiler -- latest
:: debugger -- latest
:: dev-utilities -- latest
:: dpl -- latest
:: mkl -- latest
:: tbb -- latest
:: oneAPI environment initialized ::
Launching ipexrun launch.py...
/home/rudolf/AI/automatic/venv/lib/python3.10/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension:
warn(f"Failed to load image Python extension: {e}")
2023-07-19 18:09:52,672 - intel_extension_for_pytorch.cpu.launch - WARNING - Neither TCMalloc nor JeMalloc is found in $CONDA_PREFIX/lib or $VIRTUAL_ENV/lib or /.local/lib/ or /usr/local/lib/ or /usr/local/lib64/ or /usr/lib or /usr/lib64 or /home/rudolf/.local/lib/ so the LD_PRELOAD environment variable will not be set. This may drop the performance
2023-07-19 18:09:52,672 - intel_extension_for_pytorch.cpu.launch - INFO - OMP_NUM_THREADS=8
2023-07-19 18:09:52,672 - intel_extension_for_pytorch.cpu.launch - INFO - Using Intel OpenMP
2023-07-19 18:09:52,672 - intel_extension_for_pytorch.cpu.launch - INFO - KMP_AFFINITY=granularity=fine,compact,1,0
2023-07-19 18:09:52,672 - intel_extension_for_pytorch.cpu.launch - INFO - KMP_BLOCKTIME=1
2023-07-19 18:09:52,672 - intel_extension_for_pytorch.cpu.launch - INFO - LD_PRELOAD=/home/rudolf/.local/lib/libiomp5.so
2023-07-19 18:09:52,672 - intel_extension_for_pytorch.cpu.launch - INFO - numactl -C 0-7 -m 0 /home/rudolf/AI/automatic/venv/bin/python3 -u launch.py --use-ipex
18:09:52-832300 INFO Starting SD.Next
18:09:52-835181 INFO Python 3.10.12 on Linux
18:09:52-839309 INFO Version: 88794e37 Mon Jul 17 17:14:13 2023 +0300
18:09:53-233731 INFO Latest published version: 19d176ea3d529756ca9626dabb0f9d43fba81a8c 2023-07-19T14:33:23Z
18:09:53-235891 INFO Intel OneAPI Toolkit detected
18:09:53-253637 WARNING Modified files: ['installer.py', 'launch.py', 'webui.py']
18:09:53-259533 INFO Verifying requirements
18:09:53-284485 INFO Verifying packages
18:09:53-287626 INFO Verifying repositories
18:09:56-512458 INFO Verifying submodules
18:10:01-616462 INFO Extensions enabled: ['sd-extension-system-info', 'stable-diffusion-webui-images-browser',
'multidiffusion-upscaler-for-automatic1111', 'sd-dynamic-thresholding', 'SwinIR', 'Lora',
'LDSR', 'sd-webui-agent-scheduler', 'sd-webui-controlnet', 'ScuNET', 'clip-interrogator-ext',
'a1111-sd-webui-lycoris', 'stable-diffusion-webui-rembg']
18:10:01-617770 INFO Verifying packages
18:10:01-620545 INFO Extension preload: 0.0s /home/rudolf/AI/automatic/extensions-builtin
18:10:01-621287 INFO Extension preload: 0.0s /home/rudolf/AI/automatic/extensions
18:10:01-627970 INFO Server arguments: ['--use-ipex']
/home/rudolf/AI/automatic/venv/lib/python3.10/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension:
warn(f"Failed to load image Python extension: {e}")
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ /home/rudolf/AI/automatic/launch.py:192 in <module> │
│ │
│ 191 │
│ ❱ 192 instance = start_server(immediate=True, server=None) │
│ 193 while True: │
│ │
│ /home/rudolf/AI/automatic/launch.py:136 in start_server │
│ │
│ 135 installer.log.info(f"Server arguments: {sys.argv[1:]}") │
│ ❱ 136 module_spec.loader.exec_module(server) │
│ 137 if args.test: │
│ in exec_module:883 │
│ in _call_with_frames_removed:241 │
│ │
│ /home/rudolf/AI/automatic/webui.py:23 in <module> │
│ │
│ 22 pass │
│ ❱ 23 import torchvision # pylint: disable=W0611,C0411 │
│ 24 import pytorch_lightning # pytorch_lightning should be imported after torch, but it re-e │
│ │
│ /home/rudolf/AI/automatic/venv/lib/python3.10/site-packages/torchvision/__init__.py:5 in <module> │
│ │
│ 4 import torch │
│ ❱ 5 from torchvision import datasets, io, models, ops, transforms, utils │
│ 6 │
│ │
│ /home/rudolf/AI/automatic/venv/lib/python3.10/site-packages/torchvision/datasets/__init__.py:1 in <module> │
│ │
│ ❱ 1 from ._optical_flow import FlyingChairs, FlyingThings3D, HD1K, KittiFlow, Sintel │
│ 2 from ._stereo_matching import ( │
│ │
│ /home/rudolf/AI/automatic/venv/lib/python3.10/site-packages/torchvision/datasets/_optical_flow.py:12 in <module> │
│ │
│ 11 from ..io.image import _read_png_16 │
│ ❱ 12 from .utils import _read_pfm, verify_str_arg │
│ 13 from .vision import VisionDataset │
│ │
│ /home/rudolf/AI/automatic/venv/lib/python3.10/site-packages/torchvision/datasets/utils.py:6 in <module> │
│ │
│ 5 import itertools │
│ ❱ 6 import lzma │
│ 7 import os │
│ │
│ /usr/local/lib/python3.10/lzma.py:27 in <module> │
│ │
│ 26 import os │
│ ❱ 27 from _lzma import * │
│ 28 from _lzma import _encode_filter_properties, _decode_filter_properties │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
ModuleNotFoundError: No module named '_lzma'
Traceback (most recent call last):
File "/home/rudolf/AI/automatic/venv/bin/ipexrun", line 8, in <module>
sys.exit(main())
File "/home/rudolf/AI/automatic/venv/lib/python3.10/site-packages/intel_extension_for_pytorch/cpu/launch.py", line 880, in main
launcher.launch(args)
File "/home/rudolf/AI/automatic/venv/lib/python3.10/site-packages/intel_extension_for_pytorch/cpu/launch.py", line 542, in launch
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd_s)
subprocess.CalledProcessError: Command 'numactl -C 0-7 -m 0 /home/rudolf/AI/automatic/venv/bin/python3 -u launch.py --use-ipex' returned non-zero exit status 1.
Also the sdnextlog:
Remove the venv
folder and config.json
file then try again.
Also you still have modified files:
18:09:53-253637 WARNING Modified files: ['installer.py', 'launch.py', 'webui.py']
Remove the
venv
folder andconfig.json
file then try again.Also you still have modified files:
18:09:53-253637 WARNING Modified files: ['installer.py', 'launch.py', 'webui.py']
Sorry for not responding for so long. I have completely deleted the automatic
folder from my PC and downloaded it again from Github. After running the webui.sh
I get new error stating ModuleNotFoundError: No module named '_lzma'
rudolf@Ruby:~/AI/automatic$ ./webui.sh --use-ipex
Create and activate python venv
Setting OneAPI environment
:: initializing oneAPI environment ...
webui.sh: BASH_VERSION = 5.2.15(1)-release
args: Using "$@" for setvars.sh arguments: --use-ipex
:: compiler -- latest
:: debugger -- latest
:: dev-utilities -- latest
:: dpl -- latest
:: mkl -- latest
:: tbb -- latest
:: oneAPI environment initialized ::
Launching launch.py...
07:05:32-654361 INFO Starting SD.Next
07:05:32-658835 INFO Python 3.10.12 on Linux
07:05:32-662731 INFO Version: 7bee313b Mon Jul 24 19:52:50 2023 -0400
07:05:32-665829 INFO Intel OneAPI Toolkit detected
07:05:32-667287 INFO Installing package: 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
07:06:01-651161 INFO Verifying requirements
07:06:01-652697 INFO Installing package: addict
07:06:03-076605 INFO Installing package: aenum
07:06:03-858079 INFO Installing package: aiohttp
07:06:06-705012 INFO Installing package: anyio
07:06:07-563251 INFO Installing package: appdirs
07:06:08-096138 INFO Installing package: astunparse
07:06:08-864222 INFO Installing package: bitsandbytes
07:06:10-817194 INFO Installing package: blendmodes
07:06:11-999958 INFO Installing package: clean-fid
07:06:15-172690 INFO Installing package: easydev
07:06:16-204019 INFO Installing package: extcolors
07:06:17-050868 INFO Installing package: facexlib
07:06:33-225287 INFO Installing package: filetype
07:06:33-861890 INFO Installing package: future
07:06:34-687926 INFO Installing package: gdown
07:06:35-628331 INFO Installing package: gfpgan
07:06:43-162967 INFO Installing package: GitPython
07:06:44-411594 INFO Installing package: httpcore
07:06:45-318114 INFO Installing package: inflection
07:06:46-122051 INFO Installing package: jsonmerge
07:06:47-385740 INFO Installing package: kornia
07:06:48-541951 INFO Installing package: lark
07:06:49-426769 INFO Installing package: lmdb
07:06:50-285573 INFO Installing package: lpips
07:06:51-130756 INFO Installing package: omegaconf
07:06:52-166749 INFO Installing package: open-clip-torch
07:06:55-602937 INFO Installing package: opencv-contrib-python
07:06:57-738197 INFO Installing package: piexif
07:06:58-734137 INFO Installing package: psutil
07:06:59-829630 INFO Installing package: pyyaml
07:07:00-955587 INFO Installing package: realesrgan
07:07:02-101812 INFO Installing package: resize-right
07:07:03-066235 INFO Installing package: rich
07:07:04-132706 INFO Installing package: safetensors
07:07:05-142653 INFO Installing package: scipy
07:07:06-258230 INFO Installing package: tb_nightly
07:07:07-709078 INFO Installing package: toml
07:07:08-700842 INFO Installing package: torchdiffeq
07:07:09-679193 INFO Installing package: torchsde
07:07:10-843906 INFO Installing package: voluptuous
07:07:11-847411 INFO Installing package: yapf
07:07:12-859634 INFO Installing package: scikit-image
07:07:13-907994 INFO Installing package: basicsr
07:07:14-981498 INFO Installing package: compel
07:07:20-494757 INFO Installing package: fasteners
07:07:22-200960 INFO Installing package: pyarrow==11.0.0
07:07:24-465747 INFO Installing package: typing-extensions==4.7.1
07:07:25-847109 INFO Installing package: antlr4-python3-runtime==4.9.3
07:07:27-205336 INFO Installing package: requests==2.31.0
07:07:28-571645 INFO Installing package: tqdm==4.65.0
07:07:29-975668 INFO Installing package: accelerate==0.20.3
07:07:31-474931 INFO Installing package: opencv-python==4.7.0.72
07:07:33-906343 INFO Installing package: diffusers==0.18.2
07:07:35-311993 INFO Installing package: einops==0.4.1
07:07:36-691726 INFO Installing package: gradio==3.32.0
07:07:47-735494 INFO Installing package: numexpr==2.8.4
07:07:49-329736 INFO Installing package: numpy==1.23.5
07:07:52-633040 INFO Installing package: numba==0.57.0
07:07:55-894818 INFO Installing package: pandas==1.5.3
07:08:00-705131 INFO Installing package: protobuf==3.20.3
07:08:02-397850 INFO Installing package: pytorch_lightning==1.8.6
07:08:05-513408 INFO Installing package: transformers==4.30.2
07:08:10-906636 INFO Installing package: tomesd==0.1.3
07:08:12-525645 INFO Installing package: urllib3==1.26.15
07:08:14-232688 INFO Installing package: Pillow==9.5.0
07:08:16-060131 INFO Installing package: timm==0.6.13
07:08:18-055939 INFO Installing package: pydantic==1.10.11
07:08:19-948776 INFO Verifying packages
07:08:19-949734 INFO Installing package: git+https://github.com/openai/CLIP.git
07:08:25-450047 INFO Installing package:
git+https://github.com/patrickvonplaten/invisible-watermark.git@remove_onnxruntime_depedency
07:08:32-656151 INFO Installing package: onnxruntime==1.15.1
07:08:38-760270 INFO Installing package: pi-heif
07:08:40-535345 INFO Installing package: tensorflow==2.12.0 intel-extension-for-tensorflow[gpu]
07:12:36-237411 INFO Verifying repositories
07:12:36-238921 INFO Cloning repository: https://github.com/Stability-AI/stablediffusion.git
07:13:24-657682 INFO Cloning repository: https://github.com/CompVis/taming-transformers.git
07:18:15-200854 INFO Cloning repository: https://github.com/crowsonkb/k-diffusion.git
07:18:16-156300 INFO Cloning repository: https://github.com/sczhou/CodeFormer.git
07:18:27-561401 INFO Cloning repository: https://github.com/salesforce/BLIP.git
07:18:31-233222 INFO Verifying submodules
07:21:41-681594 INFO Extension installed packages: stable-diffusion-webui-images-browser ['xxhash==3.2.0',
'datasets==2.14.0', 'Send2Trash==1.8.2', 'image-reward==1.5', 'multiprocess==0.70.15',
'fairscale==0.4.13', 'dill==0.3.7']
07:21:45-185524 INFO Extension installed packages: sd-webui-agent-scheduler ['SQLAlchemy==2.0.19',
'greenlet==2.0.2']
07:21:54-230818 INFO Extension installed packages: sd-webui-controlnet ['lxml==4.9.3', 'reportlab==4.0.4',
'protobuf==3.20.3', 'pycparser==2.21', 'portalocker==2.7.0', 'cffi==1.15.1', 'svglib==1.5.1',
'tinycss2==1.2.1', 'mediapipe==0.10.2', 'tabulate==0.9.0', 'cssselect2==0.7.0',
'webencodings==0.5.1', 'sounddevice==0.4.6', 'iopath==0.1.9', 'yacs==0.1.8',
'fvcore==0.1.5.post20221221']
07:21:56-459262 INFO Extension installed packages: clip-interrogator-ext ['clip-interrogator==0.6.0']
07:22:01-251991 INFO Extension installed packages: stable-diffusion-webui-rembg ['rembg==2.0.38', 'pooch==1.7.0',
'PyMatting==1.1.8']
07:22:01-253103 INFO Extensions enabled: ['sd-extension-system-info', 'stable-diffusion-webui-images-browser',
'multidiffusion-upscaler-for-automatic1111', 'sd-dynamic-thresholding', 'SwinIR', 'Lora',
'LDSR', 'sd-webui-agent-scheduler', 'sd-webui-controlnet', 'ScuNET', 'clip-interrogator-ext',
'a1111-sd-webui-lycoris', 'stable-diffusion-webui-rembg']
07:22:01-254210 INFO Verifying packages
07:22:01-259118 INFO Extension preload: 0.0s /home/rudolf/AI/automatic/extensions-builtin
07:22:01-259821 INFO Extension preload: 0.0s /home/rudolf/AI/automatic/extensions
07:22:01-271374 INFO Server arguments: ['--use-ipex']
/home/rudolf/AI/automatic/venv/lib/python3.10/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension:
warn(f"Failed to load image Python extension: {e}")
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ /home/rudolf/AI/automatic/launch.py:192 in <module> │
│ │
│ 191 │
│ ❱ 192 instance = start_server(immediate=True, server=None) │
│ 193 while True: │
│ │
│ /home/rudolf/AI/automatic/launch.py:136 in start_server │
│ │
│ 135 installer.log.info(f"Server arguments: {sys.argv[1:]}") │
│ ❱ 136 module_spec.loader.exec_module(server) │
│ 137 if args.test: │
│ in exec_module:883 │
│ in _call_with_frames_removed:241 │
│ │
│ /home/rudolf/AI/automatic/webui.py:23 in <module> │
│ │
│ 22 pass │
│ ❱ 23 import torchvision # pylint: disable=W0611,C0411 │
│ 24 import pytorch_lightning # pytorch_lightning should be imported after torch, but it re-e │
│ │
│ /home/rudolf/AI/automatic/venv/lib/python3.10/site-packages/torchvision/__init__.py:5 in <module> │
│ │
│ 4 import torch │
│ ❱ 5 from torchvision import datasets, io, models, ops, transforms, utils │
│ 6 │
│ │
│ /home/rudolf/AI/automatic/venv/lib/python3.10/site-packages/torchvision/datasets/__init__.py:1 in <module> │
│ │
│ ❱ 1 from ._optical_flow import FlyingChairs, FlyingThings3D, HD1K, KittiFlow, Sintel │
│ 2 from ._stereo_matching import ( │
│ │
│ /home/rudolf/AI/automatic/venv/lib/python3.10/site-packages/torchvision/datasets/_optical_flow.py:12 in <module> │
│ │
│ 11 from ..io.image import _read_png_16 │
│ ❱ 12 from .utils import _read_pfm, verify_str_arg │
│ 13 from .vision import VisionDataset │
│ │
│ /home/rudolf/AI/automatic/venv/lib/python3.10/site-packages/torchvision/datasets/utils.py:6 in <module> │
│ │
│ 5 import itertools │
│ ❱ 6 import lzma │
│ 7 import os │
│ │
│ /usr/local/lib/python3.10/lzma.py:27 in <module> │
│ │
│ 26 import os │
│ ❱ 27 from _lzma import * │
│ 28 from _lzma import _encode_filter_properties, _decode_filter_properties │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
ModuleNotFoundError: No module named '_lzma'
Here is the log sdnext.log
Can you run this command in the automatic folder and share the output:
source venv/bin/activate
pip show torchvision
This is the old torchvision:
Version: 0.14.1a0+0504df5
This is what it should install:
Version: 0.14.1a0+5e8e2f1
If it is the old version then we have to force install the new one:
source venv/bin/activate
pip install --upgrade torch==1.13.0a0+git6c9b55e torchvision==0.14.1a0+5e8e2f1 intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu
Can you run this command in the automatic folder and share the output:
source venv/bin/activate pip show torchvision
This is the old torchvision:
Version: 0.14.1a0+0504df5
This is what it should install:
Version: 0.14.1a0+5e8e2f1
If it is the old version then we have to force install the new one:
source venv/bin/activate pip install --upgrade torch==1.13.0a0+git6c9b55e torchvision==0.14.1a0+5e8e2f1 intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu
I did as instructed and the version does match up with the required one. Here is the output from terminal.
rudolf@Ruby:~/AI/automatic$ source venv/bin/activate
pip show torchvision
Name: torchvision
Version: 0.14.1a0+5e8e2f1
Summary: image and video datasets and models for torch deep learning
Home-page: https://github.com/pytorch/vision
Author: PyTorch Core Team
Author-email: soumith@pytorch.org
License: BSD
Location: /home/rudolf/AI/automatic/venv/lib/python3.10/site-packages
Requires: numpy, pillow, requests, torch, typing-extensions
Required-by: basicsr, clean-fid, clip, clip-interrogator, facexlib, gfpgan, lpips, open-clip-torch, realesrgan, timm
Try installing liblzma-dev:
apt install liblzma-dev
Try installing liblzma-dev:
apt install liblzma-dev
Already have it installed.
liblzma-dev is already the newest version (5.4.1-0.2)
Try installing lzma:
apt install lzma
If it still doesn't work, try reinstalling python since python itself should include lzma.
Or you can use a prebuilt docker image: https://blog.nuullll.com/ipex-sd-docker-for-arc-gpu/#/getting-started
Issue Description
After
webui.sh
finished downloading and installing all dependencies there is an error.I tried to install
mkl
via pip, but it didn't help. I have attached thesdnext.log
to this issue.PS. I am very sorry for creating so many issues lately.I tried to solve this problem on my own, but I'm afraid I don't have the required knowledge and experience.
sdnext.log
Version Platform Description
Ubuntu 23.04 Python 3.10.12 on Linux Version: 88794e37 Mon Jul 17 17:14:13 2023 +0300 Latest published version: 33528765211e755fc366a0914ff953c62b29f3d7 2023-07-18T11:51:42Z Intel OneAPI Toolkit detected
Acknowledgements