Skip to content

Commit fdf02c3

Browse files
d8ahazardpsychedelicious
authored andcommitted
Catch generic model errors
Prevent the app from dying on invalid models.
1 parent 0a01d86 commit fdf02c3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

invokeai/backend/model_management/model_manager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,8 @@ def scan_models_directory(
10111011
self.logger.warning(f"Not a valid model: {model_path}. {e}")
10121012
except NotImplementedError as e:
10131013
self.logger.warning(e)
1014+
except Exception as e:
1015+
self.logger.warning(f"Error loading model {model_path}. {e}")
10141016

10151017
imported_models = self.scan_autoimport_directory()
10161018
if (new_models_found or imported_models) and self.config_path:

0 commit comments

Comments
 (0)