想玩下python项目stable-diffusion,到这步报错不知道怎么解决了[笑哭]:
PS D:\phpstudy\WWW\stable-diffusion-webui> .\webui-user.bat
venv "D:\phpstudy\WWW\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Commit hash: 22bcc7be428c94e9408f589966c2040187245d81
Installing requirements for Web UI
Launching Web UI with arguments: --skip-torch-cuda-test --precision full --no-half
No module 'xformers'. Proceeding without it.
Loading weights [fd31750864] from D:\phpstudy\WWW\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
loading stable diffusion model: RuntimeError
Traceback (most recent call last):
File "D:\phpstudy\WWW\stable-diffusion-webui\webui.py", line 139, in initialize
modules.sd_models.load_model()
File "D:\phpstudy\WWW\stable-diffusion-webui\modules\sd_models.py", line 415, in load_model
state_dict = get_checkpoint_state_dict(checkpoint_info, timer)
File "D:\phpstudy\WWW\stable-diffusion-webui\modules\sd_models.py", line 262, in get_checkpoint_state_dict
res = read_state_dict(checkpoint_info.filename)
File "D:\phpstudy\WWW\stable-diffusion-webui\modules\sd_models.py", line 241, in read_state_dict
pl_sd = safetensors.torch.load_file(checkpoint_file, device=device)
File "D:\phpstudy\WWW\stable-diffusion-webui\venv\lib\site-packages\safetensors\torch.py", line 101, in load_file
result[k] = f.get_tensor(k)
RuntimeError: self.size(-1) must be divisible by 4 to view Byte as Float (different element sizes), but got 31709689
Stable diffusion model failed to load, exiting
可以看到,xformers这个依赖已经安装好了:
PS D:\phpstudy\WWW\stable-diffusion-webui> pip list
Package Version
----------------- -------
filelock 3.12.0
Jinja2 3.1.2
MarkupSafe 2.1.2
mpmath 1.3.0
mypy-extensions 1.0.0
networkx 3.1
numpy 1.24.3
pip 23.0.1
pyre-extensions 0.0.29
setuptools 65.5.0
sympy 1.11.1
torch 2.0.0
typing_extensions 4.5.0
typing-inspect 0.8.0
xformers 0.0.19
[notice] A new release of pip is available: 23.0.1 -> 23.1.2
[notice] To update, run: python.exe -m pip install --upgrade pip