PP-DocLayoutV2 没有提供inference.json参数文件,导致ONNX转换失败
Checklist:
- 查找历史相关issue寻求解答
- 翻阅FAQ
- 翻阅PaddleX 文档
- 确认bug是否在新版本里还未修复
描述问题
准备将PP-DocLayoutV2 通过转换为ONNX,然后转换为OM模型在昇腾芯片上部署。但是发现第一步转ONNX的时候存在问题。
复现
Paddle2ONNX指导文档使用的是inference.json进行ONNX转换,这个命令对于PP-DocLayout_plus-L是可以运行成功的paddle2onnx  --model_dir=/root/.paddlex/official_models/PP-DocLayout-L  --model_filename inference.json  --params_filename inference.pdiparams  --save_file=./PP-DocLayout-L/inference.onnx  --enable_onnx_checker=True
但是由于PP-DocLayoutV2 没有提供inference.json文件,只有inference.pdmodel,执行以下命令会报错
paddle2onnx  --model_dir=/root/.paddlex/official_models/PP-DocLayoutV2  --model_filename inference.pdmodel --params_filename inference.pdiparams  --save_file=./PP-DocLayoutV2 /inference.onnx  --enable_onnx_checker=True
I1029 15:46:51.943800 63363 init.cc:238] ENV [CUSTOM_DEVICE_ROOT]=/usr/local/lib/python3.10/dist-packages/paddle_custom_device
I1029 15:46:51.943861 63363 init.cc:146] Try loading custom device libs from: [/usr/local/lib/python3.10/dist-packages/paddle_custom_device]
I1029 15:46:52.803010 63363 custom_device_load.cc:51] Succeed in loading custom runtime in lib: /usr/local/lib/python3.10/dist-packages/paddle_custom_device/libpaddle-custom-npu.so
I1029 15:46:52.803079 63363 custom_device_load.cc:58] Skipped lib [/usr/local/lib/python3.10/dist-packages/paddle_custom_device/libpaddle-custom-npu.so]: no custom engine Plugin symbol in this lib.
I1029 15:46:52.806998 63363 custom_kernel.cc:68] Succeed in loading 359 custom kernel(s) from loaded lib(s), will be used like native ones.
I1029 15:46:52.807236 63363 init.cc:158] Finished in LoadCustomDevice with libs_path: [/usr/local/lib/python3.10/dist-packages/paddle_custom_device]
I1029 15:46:52.807297 63363 init.cc:244] CustomDevice: npu, visible devices count: 8
2025-10-29 15:46:53 [WARNING]	The .pdmodel file is deprecated in paddlepaddle 3.0 and will be removed in the future. Try to convert from .pdmodel file to json file.
I1029 15:46:53.956574 63363 program_interpreter.cc:257] New Executor is Running.
[Paddle2ONNX] Start parsing the Paddle model file...
[Paddle2ONNX] 
[ERROR][Paddle2ONNX] Due to the unsupported operators, the conversion is aborted.
--------------------------------------
C++ Traceback (most recent call last):
--------------------------------------
0   paddle2onnx::Export(char const*, char const*, char**, int*, int, bool, bool, bool, bool, bool, paddle2onnx::CustomOp*, int, char const*, char**, int*, char const*, bool*, bool, char**, int)
----------------------
Error Message Summary:
----------------------
FatalError: `Process abort signal` is detected by the operating system.
  [TimeInfo: *** Aborted at 1761724015 (unix time) try "date -d @1761724015" if you are using GNU date ***]
  [SignalInfo: *** SIGABRT (@0xf783) received by PID 63363 (TID 0xffff87b57010) from PID 63363 ***]
Aborted
其中有一段话[WARNING]	The .pdmodel file is deprecated in paddlepaddle 3.0 and will be removed in the future. Try to convert from .pdmodel file to json file. 提示尽量使用json进行转换。
想知道官方能否提供一下这个json文件呢?
对应的Paddle2ONNX也有一个关联的issue,也在讨论这个转换失败的问题
https://github.com/PaddlePaddle/Paddle2ONNX/issues/1608 
环境
Name: paddlepaddle  Version: 3.2.0
Name: paddlex  Version: 3.3.6
Name: paddle2onnx  Version: 2.0.1
Python  3.10
Linux系统
我们将在近期提供,感谢关注~
