-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running yolo with GPU #12690
Comments
👋 Hello @usagi123, 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 🐛 Bug Report, please provide a minimum reproducible example to help us debug it. 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. InstallPip install the pip install ultralytics EnvironmentsYOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf 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. |
Hello! It looks like you're encountering an issue where your environment is not consistently recognizing the GPU. This could indeed be related to the different Python and PyTorch versions you're using compared to those reported by YOLOv8. Here are a couple of steps to help resolve this:
If these steps don't resolve the issue, it might be helpful to reinstall the CUDA-enabled PyTorch build ensuring it matches the CUDA version installed on your machine. Sometimes, a fresh installation can clear up any discrepancies. Hope this helps! Let me know if you have any more questions. 😊 |
Thank you so much, I just uninstall both of them and reinstall and everything fixed. |
Great to hear that a reinstall fixed the issue! If you encounter any more questions or need further assistance as you continue exploring YOLOv8, feel free to reach out. Happy detecting! 😊 |
Search before asking
Question
I am just started learning how to use yolo and just trying out by follow quickstart guide. As I wanted to export model
yolov8n.pt
to engine by usingyolo export model=yolov8n.pt format=engine
which required pytorch with cuda as yolo returnsSo I double check that and it returns true
So I am confused. How my machine can both have and cannot have gpu. Not sure if this is related but I noticed yolo shown
Ultralytics YOLOv8.2.15 🚀 Python-3.10.9 torch-2.1.0
while I am using python 3.11.3 and torch 2.3.0. Maybe that's the reason?Further searching, I found this issue #4144 which the solution is to use "CUDA-enabled PyTorch build" is what I was using by installing
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
which generated from pytorch getting started locallyAdditional
No response
The text was updated successfully, but these errors were encountered: