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
905 stars 114 forks source link

Error in Colab #3

Closed freke70 closed 3 years ago

freke70 commented 3 years ago

Hi,

I'm running the colab as is and I always get this error:

pre_process_images(f'/content/PTI/{image_dir_name}_original')

RuntimeError                              Traceback (most recent call last)
<ipython-input-18-4cd7c7dc57be> in <module>()
----> 1 pre_process_images(f'/content/PTI/{image_dir_name}_original')

/content/PTI/utils/align_data.py in pre_process_images(raw_images_path)
     12 
     13     IMAGE_SIZE = 1024
---> 14     predictor = dlib.shape_predictor(paths_config.dlib)
     15     os.chdir(raw_images_path)
     16     images_names = glob.glob(f'*')
RuntimeError: Error deserializing object of type int

I did not make any changes, perhaps there is something extra I need to configure? Just letting you know.

Thanks

freke70 commented 3 years ago

I may have found the issue: The ffhq.pkl and align.dat, when downlaoded through the collab are only 3kb in size. When I download manually they are much bigger. I was able to get it working by manually downloading and uploading the files and renaming correctly