Skip to content

checkpoint load error even tough checkpoints are perfect(not corrupted) #1703

@shaikarshadayub14

Description

@shaikarshadayub14

loading the model from checkpoints/aba/latest_net_G_A.pth
Traceback (most recent call last):
File "/kaggle/working/pytorch-CycleGAN-and-pix2pix/train.py", line 38, in
model.setup(opt) # regular setup: load and print networks; create schedulers
^^^^^^^^^^^^^^^^
File "/kaggle/working/pytorch-CycleGAN-and-pix2pix/models/base_model.py", line 102, in setup
state_dict = torch.load(load_path, map_location=str(self.device), weights_only=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/torch/serialization.py", line 1072, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/torch/serialization.py", line 480, in init
super().init(torch._C.PyTorchFileReader(name_or_buffer))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions