Error

#3
by zx3o - opened

Traceback (most recent call last):
File "D:\diffu5ion\stable-diffusion-webui\webui.py", line 66, in initialize
modules.sd_models.load_model()
File "D:\diffu5ion\stable-diffusion-webui\modules\sd_models.py", line 321, in load_model
load_model_weights(sd_model, checkpoint_info)
File "D:\diffu5ion\stable-diffusion-webui\modules\sd_models.py", line 202, in load_model_weights
sd = read_state_dict(checkpoint_file)
File "D:\diffu5ion\stable-diffusion-webui\modules\sd_models.py", line 179, in read_state_dict
pl_sd = torch.load(checkpoint_file, map_location=map_location or shared.weight_load_location)
File "D:\diffu5ion\stable-diffusion-webui\modules\safe.py", line 106, in load
return load_with_extra(filename, extra_handler=global_extra_handler, *args, **kwargs)
File "D:\diffu5ion\stable-diffusion-webui\modules\safe.py", line 151, in load_with_extra
return unsafe_torch_load(filename, *args, **kwargs)
File "D:\diffu5ion\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 712, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "D:\diffu5ion\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 1049, in _load
result = unpickler.load()
File "D:\diffu5ion\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 1019, in persistent_load
load_tensor(dtype, nbytes, key, _maybe_decode_ascii(location))
File "D:\diffu5ion\stable-diffusion-webui\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 44236800 bytes.

This error message is telling you that you don't have enough memory available to load the model weights.

It looks like you are using PyTorch to load a model checkpoint file, and the torch.load function is trying to allocate 44236800 bytes of memory, but it is unable to do so because there isn't enough available memory.

One possible solution to this problem would be to try to free up some memory by closing other programs or processes that may be using a lot of memory. You could also try increasing the amount of memory available to your system, if possible. Alternatively, you could try using a smaller model, or using model checkpoint files that are smaller in size.

I'm not advanced in coding to figure it out. There is an unpickler happening so I recommend scanning all your ckpt files using this: https://github.com/diStyApps/Stable-Diffusion-Pickle-Scanner-GUI

BestJammer changed discussion status to closed

Sign up or log in to comment