If you are here because your Google Colab notebook that uses the Super-SloMo model is failing. Specifically, with a
RuntimeError or you see the following in the output:
``_pickle.UnpicklingError: invalid load key, '<'.
Then this is because the code that is used in the vast majority of notebooks to fetch this file has stopped working. We discovered that instead of downloading a 150Mb PyTorch checkpoint, it downloads a small HTML error page.
The quick fix is to:
- Download a copy of the checkpoint,
- Save it to your Google Drive,
- Connect to your Google Drive in Colab,
- Update the
pretrained_modelvariable with the path to the checkpoint.
Connect to Google Drive
With the “Files” tab open, click the third icon at the top “Mount Drive”:
You can also use the following code in your notebook:
Update your notebook
Most notebooks will have something similar to the following code in a cell:
You can simply replace everything above with one line:
Chances are you’re Google Drive is not organised in the same way as mine, but you can easily find the file in the left hand “Files” panel then right click and select “Copy path”:
What if I can’t download the file?
It’s possible that the original author may remove the file, or that the usage limits for his account will be hit, in which case the following checkpoints can be used:
Provided by MSFTserver on GitHub:
Provided by myself:
Try not to use these in scripts though as Dropbox and Google Drive do limit how many times a day one file can be downloaded.