vt-vl-lab / 3d-photo-inpainting

[CVPR 2020] 3D Photography using Context-aware Layered Depth Inpainting
https://shihmengli.github.io/3D-Photo-Inpainting/
Other
6.9k stars 1.11k forks source link

Using CPU Instead of cuda #86

Open Steinful32 opened 4 years ago

Steinful32 commented 4 years ago

Tried to use CPU Instead of cuda by replacing the gpu ids to -1 and then going into main.py and replacing "device" with "cpu" map_location=torch.device(cpu)) and i get this error code Traceback (most recent call last): File "main.py", line 80, in map_location=torch.device(cpu)) NameError: name 'cpu' is not defined

LemonATsu commented 4 years ago

You don't have to replace device with cpu. Setting the device flag to -1 should be sufficient.

Anonymous7code commented 4 years ago

Except that give a try to Colab/Asure it will provide GPU rendering without any high computational work and can also be run locally in the computer

doogyhatts commented 11 months ago

I was trying CPU mode but I got this error for the BoostingMonocularDepth:

Traceback (most recent call last): File "C:\tools\3d-photo-inpainting\BoostingMonocularDepth\run.py", line 580, in <module> run(dataset_, option_) File "C:\tools\3d-photo-inpainting\BoostingMonocularDepth\run.py", line 48, in run opt = TestOptions().parse() ^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\3d-photo-inpainting\BoostingMonocularDepth\pix2pix\options\base_options.py", line 152, in parse torch.cuda.set_device(opt.gpu_ids[0]) File "C:\ProgramData\anaconda3\Lib\site-packages\torch\cuda\__init__.py", line 350, in set_device torch._C._cuda_setDevice(device) ^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'torch._C' has no attribute '_cuda_setDevice'