UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider' #123
Thank you for NudeNet, I'm using it in my nudecrawler package, but having problems integrating new version of NudeNet.
Installed NudeNet in venv with pip install --upgrade nudenet.
Using simple script (no detection, just create NudeDetector()):
#!/usr/bin/env python
from nudenet import NudeDetector
nude_detector = NudeDetector()
And getting this warning:
$ python x.py
/tmp/nudenet-testing/.venv/lib/python3.9/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py:69: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider'
warnings.warn(
It works, if I will later use nude_detector.detect('/path/file.jpg') it makes detections. But throws this ugly warning and I want to properly avoid it (not just suppress all warnings).
As I see, this happens on NudeDetector.__init__() :
because it uses hardcoded providers. Maybe if we will have optional providers argument to __init__ to overwrite it, this would solve problem? Or maybe somehow NudeNet may use currently available providers for onnxruntime as default?
(I took this code from onnxruntime/capi/onnxruntime_inference_collection.py)
from onnxruntime.capi import _pybind_state as C
available_providers = C.get_available_providers()
Hello!
Thank you for NudeNet, I'm using it in my nudecrawler package, but having problems integrating new version of NudeNet.
Installed NudeNet in venv with
pip install --upgrade nudenet
. Using simple script (no detection, just createNudeDetector()
):And getting this warning:
It works, if I will later use
nude_detector.detect('/path/file.jpg')
it makes detections. But throws this ugly warning and I want to properly avoid it (not just suppress all warnings).As I see, this happens on
NudeDetector.__init__()
:because it uses hardcoded providers. Maybe if we will have optional
providers
argument to__init__
to overwrite it, this would solve problem? Or maybe somehow NudeNet may use currently available providers for onnxruntime as default?(I took this code from onnxruntime/capi/onnxruntime_inference_collection.py)
My environment: Debian 11. python packages: