microsoft / VQ-Diffusion

Official implementation of VQ-Diffusion
MIT License
889 stars 62 forks source link

Progress toward Google Colab with Inference Error #3

Closed metaphorz closed 2 years ago

metaphorz commented 2 years ago

I created the following Colab notebook but I am getting an error during inference. https://colab.research.google.com/drive/15JABpusfx_vk32GXDFHSiB9Y-CXJowe5#scrollTo=ox_nqiA6MMno

Here is the error from the line starting with VQ_Diffusion_model = ....


ImportError Traceback (most recent call last)

in () 1 from inference_VQ_Diffusion import VQ_Diffusion ----> 2 VQ_Diffusion_model = VQ_Diffusion(config='OUTPUT/pretrained_model/config_imagenet.yaml', path='OUTPUT/pretrained_model/imagenet_pretrained.pth') 3 VQ_Diffusion_model.inference_generate_sample_with_condition("a huge white stone castle in a meadow painted by Rene Magritte",truncation_rate=0.85, save_root="RESULT",batch_size=4) 4 VQ_Diffusion_model.inference_generate_sample_with_condition("a woman in a dark red dress painted by Norman Rockwell",truncation_rate=0.85, save_root="RESULT",batch_size=4,fast=2) # for fast inference 24 frames /usr/local/lib/python3.7/dist-packages/torchtext/vocab/vocab_factory.py in () 2 from typing import Dict, Iterable, Optional, List 3 from collections import Counter, OrderedDict ----> 4 from torchtext._torchtext import ( 5 Vocab as VocabPybind, 6 ) ImportError: /usr/local/lib/python3.7/dist-packages/torchtext/_torchtext.so: undefined symbol: _ZTVN5torch3jit6MethodE
woctezuma commented 2 years ago

It looks like an error with torchtext. See:

Based on a comment in this other issue:

Issue was due to a PyTorch version conflict.

metaphorz commented 2 years ago

Looks like torchtext 0.10 is compatible with the required version of pytorch. I have modified the notebook. I am also weaving in Google Drive mounting and separately downloading the imagenet model (which is gigantic at 8GB). I'll then store this model on Drive for easy access.

cientgu commented 2 years ago

Hi, due to the company policy, I have to set this repository to private for now... sorry about it, If you have any questions, you may find our code here( https://github.com/cientgu/VQ-Diffusion)

RealAliDatAss commented 2 years ago

is this still open or can we close it