The 1.6 release of PyTorch switched torch.save to use a new zipfile-based file format. torch.load still retains the ability to load files in the old format. If for any reason you want torch.save to use the old format, pass the kwarg _use_new_zipfile_serialization=False.
for i in os.listdir(models_old_path): state_dict = torch.load(os.path.join(models_old_path, i), map_location="cpu") torch.save(state_dict, os.path.join(models_new_path, i), _use_new_zipfile_serialization=False) print(i, 'saved')
Please contact me if you have any questions. We are using the CDN service by Cloudflare, without nodes in Chinese mainland. As for the people in Chinese mainland should solve the problem, like the terrible loading speed, by themselves.