Update model_loader.py
Browse files- model_loader.py +2 -2
model_loader.py
CHANGED
|
@@ -106,7 +106,7 @@ def load_all_models(self, progress_callback: Optional[callable] = None, cancel_e
|
|
| 106 |
self.sam2_predictor = self._load_sam2_predictor(progress_callback)
|
| 107 |
|
| 108 |
if self.sam2_predictor is None:
|
| 109 |
-
raise exceptions.ModelLoadingError("Failed to load SAM2 predictor")
|
| 110 |
|
| 111 |
sam2_time = time.time() - start_time
|
| 112 |
self.loading_stats['sam2_load_time'] = sam2_time
|
|
@@ -122,7 +122,7 @@ def load_all_models(self, progress_callback: Optional[callable] = None, cancel_e
|
|
| 122 |
self.matanyone_model, self.matanyone_core = self._load_matanyone_model(progress_callback)
|
| 123 |
|
| 124 |
if self.matanyone_model is None:
|
| 125 |
-
raise exceptions.ModelLoadingError("Failed to load MatAnyone model")
|
| 126 |
|
| 127 |
matanyone_time = time.time() - matanyone_start
|
| 128 |
self.loading_stats['matanyone_load_time'] = matanyone_time
|
|
|
|
| 106 |
self.sam2_predictor = self._load_sam2_predictor(progress_callback)
|
| 107 |
|
| 108 |
if self.sam2_predictor is None:
|
| 109 |
+
raise exceptions.ModelLoadingError("SAM2", "Failed to load SAM2 predictor")
|
| 110 |
|
| 111 |
sam2_time = time.time() - start_time
|
| 112 |
self.loading_stats['sam2_load_time'] = sam2_time
|
|
|
|
| 122 |
self.matanyone_model, self.matanyone_core = self._load_matanyone_model(progress_callback)
|
| 123 |
|
| 124 |
if self.matanyone_model is None:
|
| 125 |
+
raise exceptions.ModelLoadingError("MatAnyone", "Failed to load MatAnyone model")
|
| 126 |
|
| 127 |
matanyone_time = time.time() - matanyone_start
|
| 128 |
self.loading_stats['matanyone_load_time'] = matanyone_time
|