소스 검색

feat: 注释掉模型名称的断言,允许使用其他模型配置

zhch158_admin 2 주 전
부모
커밋
1859b996df
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      paddlex/inference/pipelines/paddleocr_vl/pipeline.py

+ 3 - 3
paddlex/inference/pipelines/paddleocr_vl/pipeline.py

@@ -93,9 +93,9 @@ class _PaddleOCRVLPipeline(BasePipeline):
                 {"model_config_error": "config error for layout_det_model!"},
             )
             model_name = layout_det_config.get("model_name", None)
-            assert (
-                model_name is not None and model_name == "PP-DocLayoutV2"
-            ), "model_name must be PP-DocLayoutV2"
+            # assert (
+            #     model_name is not None and model_name == "PP-DocLayoutV2"
+            # ), "model_name must be PP-DocLayoutV2"
             layout_kwargs = {}
             if (threshold := layout_det_config.get("threshold", None)) is not None:
                 layout_kwargs["threshold"] = threshold