3d-photo-inpainting icon indicating copy to clipboard operation
3d-photo-inpainting copied to clipboard

Using CPU Instead of cuda

Open Steinful32 opened this issue 4 years ago • 3 comments

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

Steinful32 avatar Jul 23 '20 12:07 Steinful32

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

LemonATsu avatar Jul 23 '20 17:07 LemonATsu

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

Anonymous7code avatar Jul 27 '20 07:07 Anonymous7code

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'

doogyhatts avatar Sep 16 '23 01:09 doogyhatts