You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OSError: Unable to load weights from pytorch checkpoint file. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
#67
Open
caojiehui opened this issue
Jan 31, 2024
· 0 comments
raceback (most recent call last):
File "/home/yingjie/miniconda3/envs/dpose/lib/python3.9/site-packages/transformers/modeling_utils.py", line 442, in load_state_dict
return torch.load(checkpoint_file, map_location="cpu")
File "/home/yingjie/miniconda3/envs/dpose/lib/python3.9/site-packages/torch/serialization.py", line 797, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "/home/yingjie/miniconda3/envs/dpose/lib/python3.9/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 "/home/yingjie/miniconda3/envs/dpose/lib/python3.9/site-packages/transformers/modeling_utils.py", line 446, in load_state_dict
if f.read(7) == "version":
File "/home/yingjie/miniconda3/envs/dpose/lib/python3.9/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 64: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/yingjie/DreamPose/test.py", line 62, in
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(model_id, unet=unet, torch_dtype=torch.float16, revision="fp16") #
File "/home/yingjie/miniconda3/envs/dpose/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/home/yingjie/miniconda3/envs/dpose/lib/python3.9/site-packages/diffusers/pipelines/pipeline_utils.py", line 1271, in from_pretrained
loaded_sub_model = load_sub_model(
File "/home/yingjie/miniconda3/envs/dpose/lib/python3.9/site-packages/diffusers/pipelines/pipeline_utils.py", line 525, in load_sub_model
loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)
File "/home/yingjie/miniconda3/envs/dpose/lib/python3.9/site-packages/transformers/modeling_utils.py", line 2560, in from_pretrained
state_dict = load_state_dict(resolved_archive_file)
File "/home/yingjie/miniconda3/envs/dpose/lib/python3.9/site-packages/transformers/modeling_utils.py", line 458, in load_state_dict
raise OSError(
OSError: Unable to load weights from pytorch checkpoint file for '/data3/chc/DreamPose/demo/custom-chkpts/checkpoint-499/safety_checker/pytorch_model.bin' at '/data3/chc/DreamPose/demo/custom-chkpts/checkpoint-499/safety_checker/pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
The text was updated successfully, but these errors were encountered:
caojiehui
changed the title
OSError: Unable to load weights from pytorch checkpoint file for '/data3/chc/DreamPose/demo/custom-chkpts/checkpoint-499/safety_checker/pytorch_model.bin' at '/data3/chc/DreamPose/demo/custom-chkpts/checkpoint-499/safety_checker/pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
OSError: Unable to load weights from pytorch checkpoint file. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
Jan 31, 2024
The text was updated successfully, but these errors were encountered: