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
报错
~/PaddleOCR# paddleocr ocr -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png --device npu:0
Creating model: ('PP-LCNet_x1_0_doc_ori', None)
Using official model (PP-LCNet_x1_0_doc_ori), the model files will be automatically downloaded and saved in /root/.paddlex/official_models.
/root/miniconda3/lib/python3.10/site-packages/paddle/utils/cpp_extension/extension_utils.py:711: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md
warnings.warn(warning_message)
WARNING: OMP_NUM_THREADS set to 24, not 1. The computation speed will not be optimized if you use data parallel. It will fail if this PaddlePaddle binary is compiled with OpenBlas since OpenBlas does not support multi-threads.
PLEASE USE OMP_NUM_THREADS WISELY.
I0526 23:07:45.747530 16794 init.cc:238] ENV [CUSTOM_DEVICE_ROOT]=/root/miniconda3/lib/python3.10/site-packages/paddle_custom_device
I0526 23:07:45.747579 16794 init.cc:146] Try loading custom device libs from: [/root/miniconda3/lib/python3.10/site-packages/paddle_custom_device]
I0526 23:07:47.179024 16794 custom_device_load.cc:51] Succeed in loading custom runtime in lib: /root/miniconda3/lib/python3.10/site-packages/paddle_custom_device/libpaddle-custom-npu.so
I0526 23:07:47.179114 16794 custom_device_load.cc:58] Skipped lib [/root/miniconda3/lib/python3.10/site-packages/paddle_custom_device/libpaddle-custom-npu.so]: no custom engine Plugin symbol in this lib.
I0526 23:07:47.192929 16794 custom_kernel.cc:68] Succeed in loading 359 custom kernel(s) from loaded lib(s), will be used like native ones.
I0526 23:07:47.193183 16794 init.cc:158] Finished in LoadCustomDevice with libs_path: [/root/miniconda3/lib/python3.10/site-packages/paddle_custom_device]
I0526 23:07:47.193234 16794 init.cc:244] CustomDevice: npu, visible devices count: 1
Creating model: ('UVDoc', None)
Using official model (UVDoc), the model files will be automatically downloaded and saved in /root/.paddlex/official_models.
Creating model: ('PP-LCNet_x0_25_textline_ori', None)
Using official model (PP-LCNet_x0_25_textline_ori), the model files will be automatically downloaded and saved in /root/.paddlex/official_models.
Creating model: ('PP-OCRv5_mobile_det', None)
Using official model (PP-OCRv5_mobile_det), the model files will be automatically downloaded and saved in /root/.paddlex/official_models.
Creating model: ('PP-OCRv5_mobile_rec', None)
Using official model (PP-OCRv5_mobile_rec), the model files will be automatically downloaded and saved in /root/.paddlex/official_models.
Connecting to https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png ...
Downloading general_ocr_002.png ...
[==================================================] 100.00%
Traceback (most recent call last):
File "/root/miniconda3/bin/paddleocr", line 8, in
sys.exit(console_entry())
File "/root/PaddleOCR/paddleocr/main.py", line 26, in console_entry
main()
File "/root/PaddleOCR/paddleocr/_cli.py", line 118, in main
_execute(args)
File "/root/PaddleOCR/paddleocr/_cli.py", line 111, in _execute
args.executor(args)
File "/root/PaddleOCR/paddleocr/_pipelines/ocr.py", line 578, in execute_with_args
perform_simple_inference(PaddleOCR, params)
File "/root/PaddleOCR/paddleocr/_utils/cli.py", line 58, in perform_simple_inference
for i, res in enumerate(result):
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/pipelines/_parallel.py", line 129, in predict
yield from self._pipeline.predict(
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/pipelines/ocr/pipeline.py", line 336, in predict
doc_preprocessor_results = list(
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/pipelines/_parallel.py", line 129, in predict
yield from self._pipeline.predict(
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/pipelines/doc_preprocessor/pipeline.py", line 160, in predict
preds = list(self.doc_ori_classify_model(image_arrays))
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/models/base/predictor/base_predictor.py", line 211, in call
yield from self.apply(input, **kwargs)
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/models/base/predictor/base_predictor.py", line 267, in apply
prediction = self.process(batch_data, **kwargs)
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/models/image_classification/predictor.py", line 112, in process
batch_preds = self.infer(x=x)
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/models/common/static_infer.py", line 287, in call
pred = self.infer(x)
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/models/common/static_infer.py", line 252, in call
self.predictor.run()
ValueError: In user code:
InvalidArgumentError: Attribute 1 cast error in Op Kernel Context. (at /paddle/paddle/phi/core/kernel_context.cc:122)
[operator < pd_kernel.phi_kernel > error]
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
环境:
version: 3.0.0.dev20250526
commit: b40a35371b728f196de463321b6228041a2a811d
custom_op commit: b40a35371b728f196de463321b6228041a2a811d
cann: 8.0.0
paddle-custom-npu 3.0.0.dev20250526
paddleocr 3.0.0
paddlepaddle 3.0.0.dev20250525
paddlex 3.0.0
报错
~/PaddleOCR# paddleocr ocr -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png --device npu:0
Creating model: ('PP-LCNet_x1_0_doc_ori', None)
Using official model (PP-LCNet_x1_0_doc_ori), the model files will be automatically downloaded and saved in /root/.paddlex/official_models.
/root/miniconda3/lib/python3.10/site-packages/paddle/utils/cpp_extension/extension_utils.py:711: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md
warnings.warn(warning_message)
WARNING: OMP_NUM_THREADS set to 24, not 1. The computation speed will not be optimized if you use data parallel. It will fail if this PaddlePaddle binary is compiled with OpenBlas since OpenBlas does not support multi-threads.
PLEASE USE OMP_NUM_THREADS WISELY.
I0526 23:07:45.747530 16794 init.cc:238] ENV [CUSTOM_DEVICE_ROOT]=/root/miniconda3/lib/python3.10/site-packages/paddle_custom_device
I0526 23:07:45.747579 16794 init.cc:146] Try loading custom device libs from: [/root/miniconda3/lib/python3.10/site-packages/paddle_custom_device]
I0526 23:07:47.179024 16794 custom_device_load.cc:51] Succeed in loading custom runtime in lib: /root/miniconda3/lib/python3.10/site-packages/paddle_custom_device/libpaddle-custom-npu.so
I0526 23:07:47.179114 16794 custom_device_load.cc:58] Skipped lib [/root/miniconda3/lib/python3.10/site-packages/paddle_custom_device/libpaddle-custom-npu.so]: no custom engine Plugin symbol in this lib.
I0526 23:07:47.192929 16794 custom_kernel.cc:68] Succeed in loading 359 custom kernel(s) from loaded lib(s), will be used like native ones.
I0526 23:07:47.193183 16794 init.cc:158] Finished in LoadCustomDevice with libs_path: [/root/miniconda3/lib/python3.10/site-packages/paddle_custom_device]
I0526 23:07:47.193234 16794 init.cc:244] CustomDevice: npu, visible devices count: 1
Creating model: ('UVDoc', None)
Using official model (UVDoc), the model files will be automatically downloaded and saved in /root/.paddlex/official_models.
Creating model: ('PP-LCNet_x0_25_textline_ori', None)
Using official model (PP-LCNet_x0_25_textline_ori), the model files will be automatically downloaded and saved in /root/.paddlex/official_models.
Creating model: ('PP-OCRv5_mobile_det', None)
Using official model (PP-OCRv5_mobile_det), the model files will be automatically downloaded and saved in /root/.paddlex/official_models.
Creating model: ('PP-OCRv5_mobile_rec', None)
Using official model (PP-OCRv5_mobile_rec), the model files will be automatically downloaded and saved in /root/.paddlex/official_models.
Connecting to https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png ...
Downloading general_ocr_002.png ...
[==================================================] 100.00%
Traceback (most recent call last):
File "/root/miniconda3/bin/paddleocr", line 8, in
sys.exit(console_entry())
File "/root/PaddleOCR/paddleocr/main.py", line 26, in console_entry
main()
File "/root/PaddleOCR/paddleocr/_cli.py", line 118, in main
_execute(args)
File "/root/PaddleOCR/paddleocr/_cli.py", line 111, in _execute
args.executor(args)
File "/root/PaddleOCR/paddleocr/_pipelines/ocr.py", line 578, in execute_with_args
perform_simple_inference(PaddleOCR, params)
File "/root/PaddleOCR/paddleocr/_utils/cli.py", line 58, in perform_simple_inference
for i, res in enumerate(result):
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/pipelines/_parallel.py", line 129, in predict
yield from self._pipeline.predict(
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/pipelines/ocr/pipeline.py", line 336, in predict
doc_preprocessor_results = list(
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/pipelines/_parallel.py", line 129, in predict
yield from self._pipeline.predict(
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/pipelines/doc_preprocessor/pipeline.py", line 160, in predict
preds = list(self.doc_ori_classify_model(image_arrays))
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/models/base/predictor/base_predictor.py", line 211, in call
yield from self.apply(input, **kwargs)
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/models/base/predictor/base_predictor.py", line 267, in apply
prediction = self.process(batch_data, **kwargs)
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/models/image_classification/predictor.py", line 112, in process
batch_preds = self.infer(x=x)
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/models/common/static_infer.py", line 287, in call
pred = self.infer(x)
File "/root/miniconda3/lib/python3.10/site-packages/paddlex/inference/models/common/static_infer.py", line 252, in call
self.predictor.run()
ValueError: In user code:
Beta Was this translation helpful? Give feedback.
All reactions