import pytorch报错¶
(sd-webui) D:\Program\stable-diffusion-webui>python webui.py
Traceback (most recent call last):
File "D:\Program\stable-diffusion-webui\webui.py", line 13, in <module>
initialize.imports()
File "D:\Program\stable-diffusion-webui\modules\initialize.py", line 15, in imports
import torch # noqa: F401
File "C:\ProgramData\miniconda3\envs\sd-webui\lib\site-packages\torch\__init__.py", line 148, in <module>
raise err
OSError: [WinError 126] 找不到指定的模块。 Error loading "C:\ProgramData\miniconda3\envs\sd-webui\lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.
在github下载dependencies软件,把lib/site_packages/torch/lib下的fbgemm.dll找到,拖到软件中,发现缺少libomp140.x86_64.dll
到网站下载这个dll
libomp140.x86_64.dll : Free .DLL download. (dllme.com)
之后把这个dll放到torch/lib下
再次import torch就不会报错了