Closed DAVID-Hown closed 2 years ago
Maybe you can see the releases
in this repo, which provides the correct download links for the pretrained weights.
@TimothyHTimothy Thank you for your reply, I encountered this problem when running this code, this picture is a screenshot of the errorrun FAST-VQA.ipynb
Yes I think this might be due to the broken weights file, and please download the correct one at https://github.com/TimothyHTimothy/FAST-VQA/releases/tag/v1.0.0-open-release-weights
.
I also recommend you use the new dev
branch, where we have provided more choice of weights.
Thanks, Wrong Branch。 Now, it works.
File /DATA/jupyter/share/haodawei/FAST-VQA/fastvqa/apis/fast_vqa_model.py:55, in VQAModel.load_pretrained(self, pretrained_path, device) 54 def load_pretrained(self, pretrained_path, device): ---> 55 state_dict = torch.load(pretrained_path, map_location=device) 57 if "state_dict" in state_dict: 58 state_dict = state_dict["state_dict"]
File /usr/local/python39/lib/python3.9/site-packages/torch/serialization.py:593, in load(f, map_location, pickle_module, pickle_load_args) 591 return torch.jit.load(opened_file) 592 return _load(opened_zipfile, map_location, pickle_module, pickle_load_args) --> 593 return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File /usr/local/python39/lib/python3.9/site-packages/torch/serialization.py:762, in _legacy_load(f, map_location, pickle_module, pickle_load_args) 756 if not hasattr(f, 'readinto') and (3, 8, 0) <= sys.version_info < (3, 8, 2): 757 raise RuntimeError( 758 "torch.load does not work with file-like objects that do not implement readinto on Python 3.8.0 and 3.8.1. " 759 f"Received object of type \"{type(f)}\". Please update to Python 3.8.2 or newer to restore this " 760 "functionality.") --> 762 magic_number = pickle_module.load(f, pickle_load_args) 763 if magic_number != MAGIC_NUMBER: 764 raise RuntimeError("Invalid magic number; corrupt file?")
UnpicklingError: could not find MARK