miraymen / pix2surf

Learning to Transfer Texture from Clothing Images to 3D Humans, CVPR 2020
Other
343 stars 63 forks source link

CUDA error in running demo.py #39

Open MantaRay95 opened 2 years ago

MantaRay95 commented 2 years ago

Capture

MantaRay95 commented 2 years ago

I have NVIDIA 1650 GTX and I think it is not identified by the CUDA/pix2surf conda. And I don't have a memory_map in the code. I tried changing the code too. Can you help me with this error?

choycoy commented 2 years ago

hey, how did u solive this error?

TheMarvelousWhale commented 2 years ago

Hi, can check pull request #45, I have proposed a change for cpu run. Although it won't fix the nvidia driver incompatible issue, at least the code could run

DanielaFCUP commented 2 years ago

Hi, I'm just following the steps given at https://github.com/aymenmir1/pix2surf, and I do have this error

RuntimeError: Attempting to deserialize object on CUDA device 1 but torch.cuda.device_count() is 1. Please use torch.load with map_location to map your storages to an existing device.

I've tried solutions like this torch.load('/content/pix2surf/demo.py', map_location="cuda:0") or this torch.load(/content/pix2surf/demo.py, map_location=torch.device('cpu'))

but it is not working. Any suggestion, please?

tomguluson92 commented 1 year ago
           self.device = torch.device('cuda:0')
            ...
            map_net_pth = getattr(self.opt, 'map_'+ val)
            __a = torch.load(map_net_pth, map_location=self.device)
            self.net_map.load_state_dict(__a)

            seg_net_pth = getattr(self.opt, 'seg_'+val)
            __b = torch.load(seg_net_pth, map_location=self.device)
            self.net_seg.load_state_dict(__b)