Browse Source

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

zhch158_admin 2 tuần trước cách đây
mục cha
commit
1859b996df
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  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