MiDaS
MiDaS copied to clipboard
RuntimeError: CUDA error: no kernel image is available for execution on the device
Good afternoon.
I am trying to run MiDaS on my local machine. Nvidia GeForce GT 710 video card installed on the machine So installed pytorch CPU Only package conda install pytorch == 1.8.0 torchvision == 0.9.0 torchaudio == 0.8.0 cpuonly -c pytorch
The following error occurs
.................................................. .................................................. ........... % run run.py --model_type dpt_large .................................................. .................................................. ........... initialize device: cuda start processing processing input \ Foto0000.jpg (1/1)
RuntimeError Traceback (most recent call last)
~ \ MiDaS \ run.py in
~ \ MiDaS \ run.py in run (input_path, output_path, model_path, model_type, optimize) 118 sample = torch.from_numpy (img_input) .to (device) .unsqueeze (0) 119 if optimize == True and device == torch.device ("cuda"): -> 120 sample = sample.to (memory_format = torch.channels_last) 121 sample = sample.half () 122 prediction = model.forward (sample)
RuntimeError: CUDA error: no kernel image is available for execution on the device.
Could you tell me what I'm doing wrong
haha, so you're having a the opposite problem of when I first started.
Here is a solution for you without troubleshooting the root cause. Go to line 28 and tell it to use the cpu explicitly.
device = torch.device("cpu")