taming-transformers icon indicating copy to clipboard operation
taming-transformers copied to clipboard

No module named 'torch._six'

Open Gianluca124 opened this issue 1 year ago • 6 comments

I'm trying to run the VQGAN+CLIP notebook on Google Colab. During the library import I get the following error:

`--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) in <cell line: 13>() 11 from PIL import Image 12 import requests ---> 13 from taming.models import cond_transformer, vqgan 14 import torch 15 from torch import nn, optim

2 frames /content/./taming-transformers/taming/data/utils.py in 9 import torch 10 from taming.data.helper_types import Annotation ---> 11 from torch._six import string_classes 12 from torch.utils.data._utils.collate import np_str_obj_array_pattern, default_collate_err_msg_format 13 from tqdm import tqdm

ModuleNotFoundError: No module named 'torch._six'`

Anyone can help me fix this?

Gianluca124 avatar Apr 15 '23 09:04 Gianluca124

your pytorch version is too new, try pytorch==1.7.0

Ukuer avatar Apr 16 '23 02:04 Ukuer

I tried different versions. It just needed torch==1.13.1 and torchvision==0.14.1. Thank you

Gianluca124 avatar Apr 16 '23 13:04 Gianluca124

I was having the same issue, installing those versions also fixed form. Thank you!

ProKiii avatar May 28 '23 21:05 ProKiii

Go to /content/./taming-transformers/taming/data/utils.py and comment this line from torch._six import string_classes

mukuldeep avatar Sep 13 '23 18:09 mukuldeep

dose it work if i do that? i just want vqgan back badly

bruh123-sys avatar Oct 13 '23 07:10 bruh123-sys

so how do i download torch==1.13.1 and torchvision==0.014.1

bruh123-sys avatar Oct 13 '23 07:10 bruh123-sys