Hello !
I save a PyTorch model state dict saved in github. Whenever I try to load  .pth file using  torch.utils.model_zoo.load_url(), I get this error :
File "/Users/ayushman/Desktop/retinanet_pet_detector/utils.py", line 17, in get_model
    state_dict = model_zoo.load_url(url, map_location="cpu", progress=True)
  File "/Users/ayushman/opt/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/hub.py", line 504, in load_state_dict_from_url
    raise RuntimeError('Only one file(not dir) is allowed in the zipfile')
RuntimeError: Only one file(not dir) is allowed in the zipfile

My .pth file is saved as a zip file with the following structure:
resnet34-retinanet-weights.zip
  |- resnet34-retinanet-weights.pth

I can see the zip file is get’s downloaded without any problem.  And according to the docs the downloaded file can be a zip file.
And also I manualy tried downloading and loading in the checkpoint file resnet34-retinanet-weights.pth it works .
This my code bdw:
url = "https://github.com/benihime91/retinanet_pet_detector/releases/download/retinanet_v1.0/resnet34-retinanet-weights.zip"

def get_model():
    model = Retinanet(num_classes=37, backbone_kind="resnet34")
    state_dict = model_zoo.load_url(url, map_location="cpu", progress=True)
    model.load_state_dict(state_dict)
    return model

I even tried:
def get_model():
    model = Retinanet(num_classes=37, backbone_kind="resnet34")
    state_dict = torch.hub.load_state_dict_from_url(
        url, map_location="cpu", progress=True
    )
    model.load_state_dict(state_dict)
    return model

Same error !