hila-chefer / TargetCLIP

[ECCV 2022] Official PyTorch implementation of the paper Image-Based CLIP-Guided Essence Transfer.
232 stars 27 forks source link

ModuleNotFoundError bug colab #4

Closed loboere closed 2 years ago

loboere commented 2 years ago

steps to reproduce

!git clone  https://github.com/hila-chefer/TargetCLIP.git

%cd /content/TargetCLIP

!python /content/TargetCLIP/optimization/find_dirs.py

Traceback (most recent call last):
  File "/content/TargetCLIP/optimization/find_dirs.py", line 9, in <module>
    from criteria.clip_loss import CLIPLoss
ModuleNotFoundError: No module named 'criteria'

but criteria is in the root directory

hila-chefer commented 2 years ago

Try adding the PYTHONPATH env var as specified in the README:

!git clone  https://github.com/hila-chefer/TargetCLIP.git

%cd /content/TargetCLIP

!PYTHONPATH=`pwd` python content/TargetCLIP/optimization/find_dirs.py

Kindly note that colab doesn’t have enough GPU memory to run our optimization with StyleGAN trained for 1024 resolution. If you’re planning on using it, you’ll either need colab pro or external resources (this is also why we don’t provide a training notebook).

hila-chefer commented 2 years ago

@loboere closing due to inactivity, please reopen if necessary