Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    I'm having the same issue. I've trained the model with GPU enabled (yolo detect train model=yolov8m.pt data=data/pasxalitses.yaml imgsz=640 workers=8 batch=16 device=0 epochs=3000 name=yolov8_pasx_t100m) and I've set the model to run on the GPU but it keeps using the CPU instead. I'm working on a Jetson Orin AGX developer kit, with CUDA enabled both for OpenCV and PyTorch. is there any other way to enable the GPU? Commented Apr 12, 2023 at 11:22
  • updated my answer with some more docs - maybe those will help Commented Apr 12, 2023 at 13:08
  • When using your solution {model = YOLO("yolov8n.pt", device='gpu')} I get the same error you had as well. I've tried model = YOLO("dnn_model/yolov8l.pt") and model.to(device), while setting the device to cuda but it doesn't seem to work either. The model.predict didn't work either, as it took more than 1min to run. For the model.predict I set the device to device=0 since everything else throws an exception. Commented Apr 12, 2023 at 13:27