mehdidc / feed_forward_vqgan_clip

Feed forward VQGAN-CLIP model, where the goal is to eliminate the need for optimizing the latent space of VQGAN for each input prompt
MIT License
136 stars 18 forks source link

Error in Load Model #19

Closed metaphorz closed 2 years ago

metaphorz commented 2 years ago

Two issues found:

(1) A Restart Runtime occurs on !pip install requirements.txt . This, in turn, resets the current directory to /current. But even after manually updating the current directory....

(2) Under Load Model: ImportError: /usr/local/lib/python3.7/dist-packages/torchtext/_torchtext.so: undefined symbol: _ZN3c106ivalue6Future15extractDataPtrsERKNS_6IValueE

mesw commented 2 years ago

I have tried to run the notebook and also failed.

ImportError                               Traceback (most recent call last)
<ipython-input-10-9274c6da60ac> in <module>()
      3 import clip
      4 get_ipython().magic('cd feed_forward_vqgan_clip')
----> 5 from main import load_vqgan_model, CLIP_DIM, clamp_with_grad, synth
      6 import torchvision
      7 

10 frames
/usr/local/lib/python3.7/dist-packages/torchtext/vocab.py in <module>()
     11 from typing import Dict, List, Optional, Iterable
     12 from collections import Counter, OrderedDict
---> 13 from torchtext._torchtext import (
     14     Vocab as VocabPybind,
     15 )

ImportError: /usr/local/lib/python3.7/dist-packages/torchtext/_torchtext.so: undefined symbol: _ZN3c106ivalue6Future15extractDataPtrsERKNS_6IValueE
mehdidc commented 2 years ago

Hi, thanks for reporting this, for 2) it seems to be an error with the new PyTorch (1.10), I will fix it and let you know.

mehdidc commented 2 years ago

2) is fixed, please try again

mesw commented 2 years ago

I just tried it, the notebook works now.

This is so much faster than training each input. Thanks a lot!

mehdidc commented 2 years ago

Cool! thanks for the update

metaphorz commented 2 years ago

I just ran the colab notebook on the site. Had to restart runtime in an early cell. Then, I get the following. Am I missing something?

ModuleNotFoundError Traceback (most recent call last)

in () 2 import torch 3 import clip ----> 4 from main import load_vqgan_model, CLIP_DIM, clamp_with_grad, synth 5 import torchvision 6 ModuleNotFoundError: No module named 'main'
mehdidc commented 2 years ago

Hi @metaphorz, it's probably because you needed to run the cell cd feed_forward_vqgan_clip again after restarting runtime

amirham commented 2 years ago

@mehdidc I'm getting the "ImportError: /usr/local/lib/python3.7/dist-packages/torchtext/_torchtext.so: undefined symbol: _ZTVN5torch3jit6MethodE" at the moment, might be the same cause as last time?

EDIT: It worked today, not sure if you fixed something behind the scenes or what, but I guess you can ignore this for now.

mehdidc commented 2 years ago

@amirham Yes I was fixing it indeed :), works now, thanks for mentioning it