From 7ee55489bb0628b8ba2f564fc02ee1e53e3509e1 Mon Sep 17 00:00:00 2001 From: Ryan Dick Date: Mon, 11 Sep 2023 16:45:09 -0400 Subject: [PATCH] Improve model search warning messages. --- invokeai/backend/model_management/model_search.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/invokeai/backend/model_management/model_search.py b/invokeai/backend/model_management/model_search.py index 0a98091f4a..3cded73d80 100644 --- a/invokeai/backend/model_management/model_search.py +++ b/invokeai/backend/model_management/model_search.py @@ -5,8 +5,8 @@ Abstract base class for recursive directory search for models. import os from abc import ABC, abstractmethod -from typing import List, Set, types from pathlib import Path +from typing import List, Set, types import invokeai.backend.util.logging as logger @@ -79,7 +79,7 @@ class ModelSearch(ABC): self._models_found += 1 self._scanned_dirs.add(path) except Exception as e: - self.logger.warning(str(e)) + self.logger.warning(f"Failed to process '{path}': {e}") for f in files: path = Path(root) / f @@ -90,7 +90,7 @@ class ModelSearch(ABC): self.on_model_found(path) self._models_found += 1 except Exception as e: - self.logger.warning(str(e)) + self.logger.warning(f"Failed to process '{path}': {e}") class FindModels(ModelSearch):