Browse Source

Merge pull request #2680 from myhloli/dev

fix: include model_path in key for backend model retrieval in vlm_analyze.py
Xiaomeng Zhao 5 months ago
parent
commit
039cf27fd5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      mineru/backend/vlm/vlm_analyze.py

+ 1 - 1
mineru/backend/vlm/vlm_analyze.py

@@ -27,7 +27,7 @@ class ModelSingleton:
         model_path: str | None,
         server_url: str | None,
     ) -> BasePredictor:
-        key = (backend, server_url)
+        key = (backend, model_path, server_url)
         if key not in self._models:
             if backend in ['transformers', 'sglang-engine'] and not model_path:
                 model_path = auto_download_and_get_model_root_path("/","vlm")