volotat / SD-CN-Animation

This script allows to automate video stylization task using StableDiffusion and ControlNet.
MIT License
807 stars 62 forks source link

RuntimeError: don't know how to restore data location of torch.storage.UntypedStorage (tagged with privateuseone:0) #123

Open djay29 opened 1 year ago

djay29 commented 1 year ago

An exception occurred while trying to process the frame: don't know how to restore data location of torch.storage.UntypedStorage (tagged with privateuseone:0) Traceback (most recent call last): File "E:\stable-diffusion-webui-directml\extensions\SD-CN-Animation\scripts\base_ui.py", line 141, in process yield from txt2vid.start_process(args) File "E:\stable-diffusion-webui-directml\extensions\SD-CN-Animation\scripts\core\txt2vid.py", line 107, in start_process FloweR_load_model(size[0], size[1]) File "E:\stable-diffusion-webui-directml\extensions\SD-CN-Animation\scripts\core\txt2vid.py", line 43, in FloweR_load_model FloweR_model.load_state_dict(torch.load(model_path, map_location=DEVICE)) File "E:\stable-diffusion-webui-directml\modules\safe.py", line 107, in load return load_with_extra(filename, extra_handler=global_extra_handler, args, *kwargs) File "E:\stable-diffusion-webui-directml\modules\safe.py", line 152, in load_with_extra return unsafe_torch_load(filename, args, kwargs) File "E:\stable-diffusion-webui-directml\venv\lib\site-packages\torch\serialization.py", line 809, in load return _load(opened_zipfile, map_location, pickle_module, pickle_load_args) File "E:\stable-diffusion-webui-directml\venv\lib\site-packages\torch\serialization.py", line 1172, in _load result = unpickler.load() File "C:\Users\AppData\Local\Programs\Python\Python310\lib\pickle.py", line 1213, in load dispatchkey[0] File "C:\Users\AppData\Local\Programs\Python\Python310\lib\pickle.py", line 1254, in load_binpersid self.append(self.persistent_load(pid)) File "E:\stable-diffusion-webui-directml\venv\lib\site-packages\torch\serialization.py", line 1142, in persistent_load typed_storage = load_tensor(dtype, nbytes, key, _maybe_decode_ascii(location)) File "E:\stable-diffusion-webui-directml\venv\lib\site-packages\torch\serialization.py", line 1116, in load_tensor wrap_storage=restore_location(storage, location), File "E:\stable-diffusion-webui-directml\venv\lib\site-packages\torch\serialization.py", line 1086, in restore_location return default_restore_location(storage, str(map_location)) File "E:\stable-diffusion-webui-directml\venv\lib\site-packages\torch\serialization.py", line 220, in default_restore_location raise RuntimeError("don't know how to restore data location of " RuntimeError: don't know how to restore data location of torch.storage.UntypedStorage (tagged with privateuseone:0)

djay29 commented 1 year ago

This happens after generating one frame of txt2vid on AMD graphics card using DML

gowrimanalan commented 1 year ago

yes same happened to me in AMD card after generating one frame

melbouhy commented 1 year ago

I am using macbook with M2 chip and have the same error :/

Any idea on how to fix? Thanks

Donased commented 2 months ago

I'm here in 2024 with the same issue, this is the only google search that seems to bring this up I have an AMD card as well.