You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the YOLOv8 issues and discussions and found no similar questions.
Question
I'd like to run YOLOv8.2 training and prediction models but without the use of CUDA. I have tried setting the device to GPU but I keep getting an attribute error. It's using CPU by default. How can I give it access to GPU but without CUDA?
Additional
No response
The text was updated successfully, but these errors were encountered:
👋 Hello @dy113g, thank you for your interest in Ultralytics YOLOv8 🚀! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.
If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.
Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.
YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.
To run YOLOv8 on a GPU without using CUDA, you can utilize the MPS (Metal Performance Shaders) backend if you're on an Apple device with an M1 or M2 chip. Here's how you can specify the device as 'mps' in your code:
fromultralyticsimportYOLO# Load your modelmodel=YOLO('yolov8n.pt')
# Set the device to MPS for Apple Siliconresults=model.predict('path/to/image.jpg', device='mps')
This will allow you to leverage the GPU capabilities of Apple Silicon without needing CUDA. If you're not on an Apple device, running YOLOv8 on a GPU generally requires CUDA as it relies on NVIDIA's GPU architecture.
Let me know if this helps or if you have any other questions!
Search before asking
Question
I'd like to run YOLOv8.2 training and prediction models but without the use of CUDA. I have tried setting the device to GPU but I keep getting an attribute error. It's using CPU by default. How can I give it access to GPU but without CUDA?
Additional
No response
The text was updated successfully, but these errors were encountered: