stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: RuntimeError: self.size(-1) must be divisible by 4 to view Byte as Float (different element sizes), but got 5910330
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
venv "D:\AIpainting\venv\Scripts\Python.exe" Python 3.10.9 | packaged by Anaconda, Inc. | (main, Mar 1 2023, 18:18:15) [MSC v.1916 64 bit (AMD64)] Commit hash: 22bcc7be428c94e9408f589966c2040187245d81 Installing requirements for Web UI Launching Web UI with arguments: No module 'xformers'. Proceeding without it. Loading weights [1effcade9b] from D:\AIpainting\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors loading stable diffusion model: RuntimeError Traceback (most recent call last): File "D:\AIpainting\webui.py", line 139, in initialize modules.sd_models.load_model() File "D:\AIpainting\modules\sd_models.py", line 415, in load_model state_dict = get_checkpoint_state_dict(checkpoint_info, timer) File "D:\AIpainting\modules\sd_models.py", line 262, in get_checkpoint_state_dict res = read_state_dict(checkpoint_info.filename) File "D:\AIpainting\modules\sd_models.py", line 241, in read_state_dict pl_sd = safetensors.torch.load_file(checkpoint_file, device=device) File "D:\AIpainting\venv\lib\site-packages\safetensors-0.3.0-py3.10-win-amd64.egg\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 5910330
Stable diffusion model failed to load, exiting 请按任意键继续. . .
Steps to reproduce the problem
否
What should have happened?
否
Commit where the problem happens
venv "D:\AIpainting\venv\Scripts\Python.exe" Python 3.10.9 | packaged by Anaconda, Inc. | (main, Mar 1 2023, 18:18:15) [MSC v.1916 64 bit (AMD64)] Commit hash: 22bcc7be428c94e9408f589966c2040187245d81 Installing requirements for Web UI Launching Web UI with arguments: No module 'xformers'. Proceeding without it. Loading weights [1effcade9b] from D:\AIpainting\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors loading stable diffusion model: RuntimeError Traceback (most recent call last): File "D:\AIpainting\webui.py", line 139, in initialize modules.sd_models.load_model() File "D:\AIpainting\modules\sd_models.py", line 415, in load_model state_dict = get_checkpoint_state_dict(checkpoint_info, timer) File "D:\AIpainting\modules\sd_models.py", line 262, in get_checkpoint_state_dict res = read_state_dict(checkpoint_info.filename) File "D:\AIpainting\modules\sd_models.py", line 241, in read_state_dict pl_sd = safetensors.torch.load_file(checkpoint_file, device=device) File "D:\AIpainting\venv\lib\site-packages\safetensors-0.3.0-py3.10-win-amd64.egg\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 5910330 Stable diffusion model failed to load, exiting 请按任意键继续. . .
What platforms do you use to access the UI ?
Windows
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
否
List of extensions
否
Console logs
venv "D:\AIpainting\venv\Scripts\Python.exe"
Python 3.10.9 | packaged by Anaconda, Inc. | (main, Mar 1 2023, 18:18:15) [MSC v.1916 64 bit (AMD64)]
Commit hash: 22bcc7be428c94e9408f589966c2040187245d81
Installing requirements for Web UI
Launching Web UI with arguments:
No module 'xformers'. Proceeding without it.
Loading weights [1effcade9b] from D:\AIpainting\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
loading stable diffusion model: RuntimeError
Traceback (most recent call last):
File "D:\AIpainting\webui.py", line 139, in initialize
modules.sd_models.load_model()
File "D:\AIpainting\modules\sd_models.py", line 415, in load_model
state_dict = get_checkpoint_state_dict(checkpoint_info, timer)
File "D:\AIpainting\modules\sd_models.py", line 262, in get_checkpoint_state_dict
res = read_state_dict(checkpoint_info.filename)
File "D:\AIpainting\modules\sd_models.py", line 241, in read_state_dict
pl_sd = safetensors.torch.load_file(checkpoint_file, device=device)
File "D:\AIpainting\venv\lib\site-packages\safetensors-0.3.0-py3.10-win-amd64.egg\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 5910330
Stable diffusion model failed to load, exiting
请按任意键继续. . .
Additional information
否
hi, this helped me https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/8132
Duplicate of https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/8653