insightface icon indicating copy to clipboard operation
insightface copied to clipboard

Unable to use GPU

Open xxlisa opened this issue 1 year ago • 6 comments

Already installed onnxruntime-gpu,ctx_id=0,There is also GPU:0 in the environment,But the model still runs using cpu

xxlisa avatar May 10 '23 09:05 xxlisa

Please check the compatibility of onnxruntime-gpu library with your GPU model.

nttstar avatar May 10 '23 12:05 nttstar

Thank you, it is indeed a version mismatch issue

xxlisa avatar May 18 '23 01:05 xxlisa

What was the version mismatch issue you had? I was running with GPU version fine on cloud machine but then one day it starts loading CPU version instead. Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} I'm not sure what exactly is the cause. Tried decreasing onnxruntime-gpu version from 1.15.0 to 1.14.0 but it doesn't help.

offchan42 avatar Jun 16 '23 15:06 offchan42

OK In my case it turns out to be an issue relating to importing pytorch. If I don't import torch before importing FaceAnalysis then only CPU model would be loaded. https://github.com/deepinsight/insightface/issues/2344

offchan42 avatar Jun 16 '23 17:06 offchan42

does anyone please know what to do?

AbdusamadDev avatar Sep 04 '23 19:09 AbdusamadDev

does anyone please know what to do?

uninstall onnxruntime and then install onnxruntime-gpu.Then you can use gpu

zaojue405 avatar Oct 16 '23 14:10 zaojue405