我的安装环境是windows 11 Pro N,安装webUI时点击webui-user.bat后出现这个错误。
Traceback (most recent call last):
File "D:\Users\bamboo\stable-diffusion-webui-1.5.1\launch.py", line 39, in
main()
File "D:\Users\bamboo\stable-diffusion-webui-1.5.1\launch.py", line 35, in main
start()
File "D:\Users\bamboo\stable-diffusion-webui-1.5.1\modules\launch_utils.py", line 390, in start
import webui
File "D:\Users\bamboo\stable-diffusion-webui-1.5.1\webui.py", line 61, in
from modules import shared, sd_samplers, upscaler, extensions, localization, ui_tempdir, ui_extra_networks, config_states
File "D:\Users\bamboo\stable-diffusion-webui-1.5.1\modules\sd_samplers.py", line 1, in
from modules import sd_samplers_compvis, sd_samplers_kdiffusion, shared
File "D:\Users\bamboo\stable-diffusion-webui-1.5.1\modules\sd_samplers_compvis.py", line 9, in
from modules import sd_samplers_common, prompt_parser, shared
File "D:\Users\bamboo\stable-diffusion-webui-1.5.1\modules\sd_samplers_common.py", line 5, in
from modules import devices, processing, images, sd_vae_approx, sd_samplers, sd_vae_taesd
File "D:\Users\bamboo\stable-diffusion-webui-1.5.1\modules\processing.py", line 12, in
import cv2
File "D:\Users\bamboo\stable-diffusion-webui-1.5.1\venv\lib\site-packages\cv2__init__.py", line 181, in
bootstrap()
File "D:\Users\bamboo\stable-diffusion-webui-1.5.1\venv\lib\site-packages\cv2__init__.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "C:\Users\bamboo\AppData\Local\Programs\Python\Python310\lib\importlib__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed while importing cv2: The specified module could not be found.
Press any key to continue . . .
解决方法:
I have enabled the “Media Feature Pack” as described bellow and the .bat continued.
Windows 10 N: Select the Start button, then select Settings > Apps > Apps & features > Optional features > Add a feature. Then locate the Media Feature Pack in the list of available optional features.