KeyError Convert SWIN to Pytorch

I’m using this script ( to make this model (A Large-Scale Benchmark for Food Image Segmentation).

I’ve successfully converted it with the updated labels (mccaly/test2 · Hugging Face) but when I try and convert it with the Model’s Checkpoints, swin_small I get huge amount of KeyErrors.

** some people are having an issue unzipping the model checkpoint file so I uploaded here (checkpoints - Google Drive)**

I’m referencing the checkpoint in the script as:
def convert_upernet_checkpoint(model_name, pytorch_dump_folder_path, push_to_hub): local_checkpoint_path = "./checkpoints/iter_80000.pth" state_dict = torch.load(local_checkpoint_path, map_location="cpu") model_state_dict = state_dict['state_dict']

Rather than it pulling the standard checkpoint from

Any reason why i can’t get it to work with the local checkpoint?