failed finding central directory & UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 128: invalid start byte

#1
by tintwotin - opened

0.1.1 worked perfectly, but 512 gives me this error - running though Diffusers:

Traceback (most recent call last):
File "C:\Users\XXXX\AppData\Roaming\Python\Python310\site-packages\diffusers\models\modeling_utils.py", line 100, in load_state_dict
return torch.load(checkpoint_file, map_location="cpu")
File "C:\Users\XXXX\AppData\Roaming\Python\Python310\site-packages\torch\serialization.py", line 797, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "C:\Users\XXXX\AppData\Roaming\Python\Python310\site-packages\torch\serialization.py", line 283, in init
super().init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\XXXX\AppData\Roaming\Python\Python310\site-packages\diffusers\models\modeling_utils.py", line 106, in load_state_dict
if f.read().startswith("version"):
File "C:\Program Files\Blender Foundation\Blender 3.5\3.5\python\lib\codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 128: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\XXXX\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\text_to_video-main_init_.py", line 597, in execute
pipe = DiffusionPipeline.from_pretrained(
File "C:\Users\XXXX\AppData\Roaming\Python\Python310\site-packages\diffusers\pipelines\pipeline_utils.py", line 1039, in from_pretrained
loaded_sub_model = load_sub_model(
File "C:\Users\XXXX\AppData\Roaming\Python\Python310\site-packages\diffusers\pipelines\pipeline_utils.py", line 445, in load_sub_model
loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)
File "C:\Users\XXXX\AppData\Roaming\Python\Python310\site-packages\diffusers\models\modeling_utils.py", line 579, in from_pretrained
state_dict = load_state_dict(model_file, variant=variant)
File "C:\Users\XXXX\AppData\Roaming\Python\Python310\site-packages\diffusers\models\modeling_utils.py", line 118, in load_state_dict
raise OSError(
OSError: Unable to load weights from checkpoint file for 'C:\Users\XXXX.cache\huggingface\hub\models--strangeman3107--animov-512x\snapshots\77e93e3f4ce8fedf127cd354cec72027be6f177b\unet\diffusion_pytorch_model.bin' at 'C:\Users\XXXX.cache\huggingface\hub\models--strangeman3107--animov-512x\snapshots\77e93e3f4ce8fedf127cd354cec72027be6f177b\unet\diffusion_pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
Error: Python: Traceback (most recent call last):
File "C:\Users\XXXX\AppData\Roaming\Python\Python310\site-packages\diffusers\models\modeling_utils.py", line 100, in load_state_dict
return torch.load(checkpoint_file, map_location="cpu")
File "C:\Users\XXXX\AppData\Roaming\Python\Python310\site-packages\torch\serialization.py", line 797, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "C:\Users\XXXX\AppData\Roaming\Python\Python310\site-packages\torch\serialization.py", line 283, in init
super().init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\XXXX\AppData\Roaming\Python\Python310\site-packages\diffusers\models\modeling_utils.py", line 106, in load_state_dict
if f.read().startswith("version"):
File "C:\Program Files\Blender Foundation\Blender 3.5\3.5\python\lib\codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 128: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\XXXX\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\text_to_video-main_init_.py", line 597, in execute
pipe = DiffusionPipeline.from_pretrained(
File "C:\Users\XXXX\AppData\Roaming\Python\Python310\site-packages\diffusers\pipelines\pipeline_utils.py", line 1039, in from_pretrained
loaded_sub_model = load_sub_model(
File "C:\Users\XXXX\AppData\Roaming\Python\Python310\site-packages\diffusers\pipelines\pipeline_utils.py", line 445, in load_sub_model
loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)
File "C:\Users\XXXX\AppData\Roaming\Python\Python310\site-packages\diffusers\models\modeling_utils.py", line 579, in from_pretrained
state_dict = load_state_dict(model_file, variant=variant)
File "C:\Users\XXXX\AppData\Roaming\Python\Python310\site-packages\diffusers\models\modeling_utils.py", line 118, in load_state_dict
raise OSError(
OSError: Unable to load weights from checkpoint file for 'C:\Users\XXXX.cache\huggingface\hub\models--strangeman3107--animov-512x\snapshots\77e93e3f4ce8fedf127cd354cec72027be6f177b\unet\diffusion_pytorch_model.bin' at 'C:\Users\XXXX.cache\huggingface\hub\models--strangeman3107--animov-512x\snapshots\77e93e3f4ce8fedf127cd354cec72027be6f177b\unet\diffusion_pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.

It was csused by a bad download.

tintwotin changed discussion status to closed

Sign up or log in to comment