danielroich / PTI

Official Implementation for "Pivotal Tuning for Latent-based editing of Real Images" (ACM TOG 2022) https://arxiv.org/abs/2106.05744
MIT License
897 stars 112 forks source link

RuntimeError: ./pretrained_models/e4e_ffhq_encode.pt is a zip archive (did you mean to use torch.jit.load()?) #22

Closed mapleyuan closed 3 years ago

mapleyuan commented 3 years ago

hi, i got a error and i search the google it maybe the torch version prob. could u provide your torch version and my torch version as below. torch==1.3.0 torchsummary==1.5.1 torchvision==0.4.1

RuntimeError: ./pretrained_models/e4e_ffhq_encode.pt is a zip archive (did you mean to use torch.jit.load()?)

woctezuma commented 3 years ago

torch==1.3.0

This is an old version. In this issue https://github.com/pytorch/pytorch/issues/43766, someone mentions that torch.jit.load() does not even exist in version 1.7, and you are using version 1.3.

It could also be that the model was exported with an old version of PyTorch, e.g. 1.6, based on https://github.com/locuslab/mdeq/issues/6