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

ValueError while using ONNX DB Net to infer #8688

Closed
thsno02 opened this issue Dec 22, 2022 · 1 comment
Closed

ValueError while using ONNX DB Net to infer #8688

thsno02 opened this issue Dec 22, 2022 · 1 comment
Assignees

Comments

@thsno02
Copy link

thsno02 commented Dec 22, 2022

请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem

  • 系统环境/System Environment: CentOS 7
  • 版本号/Version:Paddle:2.3.1-gpu PaddleOCR:2.6.0 问题相关组件/Related components:onnx, 1.13.0; onnxruntime-gpu, 1.13.1
  • 运行指令/Command Code:python3 tools/infer_predict.py --use_onnx=True
  • 完整报错/Complete Error Message:ValueError: This ORT build has ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider'] enabled. Since ORT 1.9, you are required to explicitly set the providers parameter when instantiating InferenceSession. For example, onnxruntime.InferenceSession(..., providers=['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider'], ...)
@thsno02
Copy link
Author

thsno02 commented Dec 22, 2022

Workaround:

replace

sess = ort.InferenceSession(model_file_path)

with

sess = ort.InferenceSession(model_file_path, providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])

REF: neuralchen/SimSwap#176

@thsno02 thsno02 closed this as completed Dec 22, 2022
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

2 participants