Closed bertsky closed 2 years ago
Like so often (with this module), the problem runs deeper.
Even if you:
-1
to represent non-GPU/CUDA, and pass that as the empty list to pix2pixHD, since its TestOptions().parse()
gets called before gpu_ids
is set, it will try to initialize CUDAsys.argv
for pix2pix (i.e. '--gpu_ids'
and str(parameter['gpu_ids'])
), the inference code in pix2pix will try to use .cuda()
everywhereThus, IMO there's no way to run the dewarper without GPU, or with a CUDA-enabled GPU with "only" 4GB RAM. :-1:
Thanks for trying and detailling how it fails. I will refactor the tool to at least properly integrate pix2pixHD repo as a submodule, installed with the tool and take a look at the parameter handling.
Thus, IMO there's no way to run the dewarper without GPU, or with a CUDA-enabled GPU with "only" 4GB RAM.
I have no access to GPU at all, so I cannot test (unless I the cpu variant working) but at least these glaring shortcomings can be fixed.
fixed by #89
On a CUDA-enabled system with more than 3GB of GPU memory currently free, I get this from
dewarp
:Frankly, this does not make any sense to me.
However, I thought, at least I should be able to disable GPU computation. The only parameter that can influence Pytorch setup in dewarp is
gpu_id
, which would need to be set to'cpu'
. But the tool JSON requires this to be a number!