Skip to content
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

AssertionError: Torch not compiled with CUDA enabled #399

Open
Yonom1 opened this issue Feb 5, 2025 · 0 comments
Open

AssertionError: Torch not compiled with CUDA enabled #399

Yonom1 opened this issue Feb 5, 2025 · 0 comments

Comments

@Yonom1
Copy link

Yonom1 commented Feb 5, 2025

Dear Author,

I am using the FCOS model in a Windows 11 environment, and I followed the option 1 installation steps in Install.md. During the quick demo stage, after downloading the .pth file, I ran python demo/fcos_demo.py and encountered the following error:

(FCOS) PS E:\Defect_detection_in_the_textile_industry\FCOS> python demo/fcos_demo.py
Traceback (most recent call last):
File "demo/fcos_demo.py", line 109, in
main()
File "demo/fcos_demo.py", line 90, in main
coco_demo = COCODemo(
File "E:\Defect_detection_in_the_textile_industry\FCOS\demo\predictor.py", line 112, in init
self.model.to(self.device)
File "D:\Anaconda3\envs\FCOS\lib\site-packages\torch\nn\modules\module.py", line 1174, in to
return self._apply(convert)
File "D:\Anaconda3\envs\FCOS\lib\site-packages\torch\nn\modules\module.py", line 780, in _apply
module._apply(fn)
File "D:\Anaconda3\envs\FCOS\lib\site-packages\torch\nn\modules\module.py", line 780, in _apply
module._apply(fn)
[Previous line repeated 1 more time]
File "D:\Anaconda3\envs\FCOS\lib\site-packages\torch\nn\modules\module.py", line 805, in apply
param_applied = fn(param)
File "D:\Anaconda3\envs\FCOS\lib\site-packages\torch\nn\modules\module.py", line 1160, in convert
return t.to(
File "D:\Anaconda3\envs\FCOS\lib\site-packages\torch\cuda_init
.py", line 305, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

It appears that the Torch version installed following the install.md instructions doesn't support CUDA.

Could you please advise how to modify the project to resolve this issue and enable CUDA support? Is there a specific Torch version that is compatible with CUDA and this project?

Thanks for your help!

Best regards,
Yonom1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant