dressing-in-order icon indicating copy to clipboard operation
dressing-in-order copied to clipboard

AssertionError: during running the demo.ipynb

Open soumyadeeproy12 opened this issue 3 years ago • 3 comments

I was just tried running the demo.ipynb file, and I got the error. complete error log:

AssertionError Traceback (most recent call last) <ipython-input-3-0d7fae2cb9db> in <module>() ----> 1 model = DIORModel(opt) 2 model.setup(opt) /Users/soumyadeeproy/Downloads/dressing-in-order-main/models/dior_model.py in __init__(self, opt) 9 class DIORModel(DIORBaseModel): 10 def __init__(self, opt): ---> 11 DIORBaseModel.__init__(self, opt) 12 self.netE_opt = opt.netE 13 self.frozen_flownet = opt.frozen_flownet /Users/soumyadeeproy/Downloads/dressing-in-order-main/models/dior_base_model.py in __init__(self, opt) 21 self.n_style_blocks = opt.n_style_blocks 22 # init_models ---> 23 self._init_models(opt) 24 25 # loss /Users/soumyadeeproy/Downloads/dressing-in-order-main/models/dior_model.py in _init_models(self, opt) 59 60 def _init_models(self, opt): ---> 61 super()._init_models(opt) 62 self.model_names += ["Flow"] 63 if opt.frozen_flownet: /Users/soumyadeeproy/Downloads/dressing-in-order-main/models/dior_base_model.py in _init_models(self, opt) 65 self.frozen_models = ["VGG"] 66 self.visual_names = ['from_img', 'fake_B', 'to_img'] ---> 67 self.netVGG = networks.define_tool_networks(tool='vgg', load_ckpt_path="", gpu_ids=opt.gpu_ids) 68 69 # netG /Users/soumyadeeproy/Downloads/dressing-in-order-main/models/networks/__init__.py in define_tool_networks(tool, load_ckpt_path, gpu_ids, init_type, init_gain) 66 print("[init] init pre-trained model %s." % tool) 67 ---> 68 return init_net(net, gpu_ids=gpu_ids, do_init_weight=False) 69 70 def define_E(input_nc, output_nc, netE, ngf=64, n_downsample=3, norm_type='none', relu_type='relu', frozen_flownet=True, init_type='normal', init_gain=0.02, gpu_ids=[]): /Users/soumyadeeproy/Downloads/dressing-in-order-main/models/networks/base_networks.py in init_net(net, init_type, init_gain, gpu_ids, do_init_weight) 101 if len(gpu_ids) > 0: 102 # import pdb; pdb.set_trace() --> 103 assert(torch.cuda.is_available()) 104 105 net = net.cuda() AssertionError:

seems like the error is inside the dior_model file

soumyadeeproy12 avatar Oct 18 '21 12:10 soumyadeeproy12

Looks like there is no GPU in your environment as the assertion suggested. Maybe you can double check if there are GPUs?

cuiaiyu avatar Oct 18 '21 17:10 cuiaiyu

Hi Aiyu,

Can you please help. I have 1 GPU V100 Tesla. and I am getting similar error. Attached screenshot. How can I resolv WhatsApp Image 2021-10-19 at 9 17 33 PM e

harshitsharma0003 avatar Oct 19 '21 16:10 harshitsharma0003

maybe that your version of pytorch and cuda are not the same ,they can not match each other. As for me ,my torch matches cuda9.0, but my cuda is 10.0.130

Cauthygaussian avatar Mar 24 '24 12:03 Cauthygaussian