stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]not enough memory while loading models
After updated the latest version, it cannot start and keep reporting errors below: (when initialize shared.sd_model = modules.sd_models.load_model())
RuntimeError: DefaultCPUAllocator: not enough memory: you tried to allocate xxxxxxx bytes.
the last version I used and worked normally is git-7432b6f4d2.
detailed info:
Loading weights [e6e8e1fc] from D:\Stable Diffusion\models\Stable-diffusion\latest-e6e1e8fc.ckpt
Traceback (most recent call last):
File "D:\Stable Diffusion\launch.py", line 213, in <module>
start_webui()
File "D:\Stable Diffusion\launch.py", line 208, in start_webui
webui.webui()
File "D:\Stable Diffusion\webui.py", line 122, in webui
initialize()
File "D:\Stable Diffusion\webui.py", line 84, in initialize
shared.sd_model = modules.sd_models.load_model()
File "D:\Stable Diffusion\modules\sd_models.py", line 215, in load_model
load_model_weights(sd_model, checkpoint_info)
File "D:\Stable Diffusion\modules\sd_models.py", line 164, in load_model_weights
pl_sd = torch.load(checkpoint_file, map_location=shared.weight_load_location)
File "D:\Stable Diffusion\modules\safe.py", line 113, in load
return unsafe_torch_load(filename, *args, **kwargs)
File "D:\Stable Diffusion\venv\lib\site-packages\torch\serialization.py", line 712, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "D:\Stable Diffusion\venv\lib\site-packages\torch\serialization.py", line 1049, in _load
result = unpickler.load()
File "D:\Stable Diffusion\venv\lib\site-packages\torch\serialization.py", line 1019, in persistent_load
load_tensor(dtype, nbytes, key, _maybe_decode_ascii(location))
File "D:\Stable Diffusion\venv\lib\site-packages\torch\serialization.py", line 997, in load_tensor
storage = zip_file.get_storage_from_record(name, numel, torch._UntypedStorage).storage()._untyped()
RuntimeError: [enforce fail at ..\c10\core\impl\alloc_cpu.cpp:81] data. DefaultCPUAllocator: not enough memory: you tried to allocate 29491200 bytes.