{"record":{"id":"f2470edf5ca14ad7","repo":"PaddlePaddle/PaddleOCR","slug":"model-name-is-not-supported-please-check-if-the-f2470e","errorCode":null,"errorMessage":"{model_name} is not supported. Please check if the model is supported by the PaddleOCR wheel.","messagePattern":"(.+?) is not supported\\. Please check if the model is supported by the PaddleOCR wheel\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/infer/predict_e2e.py","lineNumber":43,"sourceCode":"import time\nimport sys\n\nimport tools.infer.utility as utility\nfrom ppocr.utils.logging import get_logger\nfrom ppocr.utils.utility import get_image_file_list, check_and_read\nfrom ppocr.data import create_operators, transform\nfrom ppocr.postprocess import build_post_process\n\nlogger = get_logger()\n\n\nclass TextE2E(object):\n    def __init__(self, args):\n        if os.path.exists(f\"{args.e2e_model_dir}/inference.yml\"):\n            model_config = utility.load_config(f\"{args.e2e_model_dir}/inference.yml\")\n            model_name = model_config.get(\"Global\", {}).get(\"model_name\", \"\")\n            if model_name:\n                raise ValueError(\n                    f\"{model_name} is not supported. Please check if the model is supported by the PaddleOCR wheel.\"\n                )\n\n        self.args = args\n        self.e2e_algorithm = args.e2e_algorithm\n        self.use_onnx = args.use_onnx\n        pre_process_list = [\n            {\"E2EResizeForTest\": {}},\n            {\n                \"NormalizeImage\": {\n                    \"std\": [0.229, 0.224, 0.225],\n                    \"mean\": [0.485, 0.456, 0.406],\n                    \"scale\": \"1./255.\",\n                    \"order\": \"hwc\",\n                }\n            },\n            {\"ToCHWImage\": None},\n            {\"KeepKeys\": {\"keep_keys\": [\"image\", \"shape\"]}},","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/PaddlePaddle/PaddleOCR/blob/2661c7c0ef5c613e8f93c6e93b2e052399f0f854/tools/infer/predict_e2e.py#L25-L61","documentation":"TextE2E (tools/infer/predict_e2e.py) reads inference.yml from the e2e model directory, and — unlike cls/det/rec — rejects ANY model that declares a Global.model_name at all. The end-to-end pipeline is not supported by the PaddleOCR wheel, so any model carrying modern metadata fails immediately. Models without inference.yml proceed unchecked, but no wheel-blessed e2e model ships that metadata.","triggerScenarios":"Running e2e inference (--e2e_algorithm=True / predict_e2e) with --e2e_model_dir pointing at a model directory that contains an inference.yml with a non-empty Global.model_name.","commonSituations":"Reusing a PGNet/premium e2e model repackaged with new-style metadata; pointing --e2e_model_dir at a det/rec model dir by mistake; mixing new wheel conventions with the legacy e2e zoo models.","solutions":["Use the legacy e2e model packages from the PaddleOCR model zoo, which do not include inference.yml","Delete inference.yml from the e2e model directory (the gate only fires when the file exists)","Switch from e2e to the standard det+rec pipeline, which is fully supported by the wheel"],"exampleFix":"# before\n--e2e_model_dir=./inference/e2e_server_pgnetA  # contains inference.yml -> ValueError\n\n# after\nrm ./inference/e2e_server_pgnetA/inference.yml\n# or use the original zoo tarball without inference.yml","handlingStrategy":"validation","validationCode":"import os\nyml = os.path.join(e2e_model_dir, 'inference.yml')\nif os.path.exists(yml):\n    raise SystemExit('e2e models carrying inference.yml are rejected by the wheel — use legacy zoo packages or remove the yml')","typeGuard":null,"tryCatchPattern":"try:\n    e2e = TextE2E(args)\nexcept ValueError as e:\n    if 'not supported' in str(e):\n        raise SystemExit('e2e pipeline unsupported by wheel; use det+rec instead')\n    raise","preventionTips":["Prefer the det+rec pipeline for new deployments; e2e is legacy","Keep e2e zoo tarballs in original form (no repackaging with inference.yml)"],"tags":["model-compatibility","e2e","whitelist","wheel"],"backgroundTag":null,"analyzedSha":"2661c7c0ef5c613e8f93c6e93b2e052399f0f854","analyzedAt":"2026-08-14T20:17:30.180Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}