GroundingDINO icon indicating copy to clipboard operation
GroundingDINO copied to clipboard

running under python in cpu only mode

Open SevenChords opened this issue 1 year ago • 1 comments

I don't have a gpu so i can't use cuda, but when trying to annotate a test image i get an error saying that torch has been compiled without cuda. I am using the example running with python code from the readme on this repo.

i also tried adding "device='cpu'" to the load_model() command, still the same error saying that torch has been compiled without cuda (i can't compile it with cuda as i don't have access to any setup where cuda is available)

how can i "force" the annotate command to use cpu only? or is there an alternative way of using the annotate command with no cuda available?

SevenChords avatar Nov 28 '23 14:11 SevenChords

You need to specify the device when loading the model and when using predict(). So set device='cpu' into both and it should work.

ibrahimxbashir avatar May 16 '24 17:05 ibrahimxbashir