mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
gracefully recover from failed model load
This commit is contained in:
parent
1c102c71fc
commit
916f5bfbb2
@ -72,7 +72,8 @@ class ModelCache(object):
|
||||
self.models[model_name]['hash'] = hash
|
||||
except Exception as e:
|
||||
print(f'** model {model_name} could not be loaded: {str(e)}')
|
||||
return {}
|
||||
print(f'** restoring {self.current_model}')
|
||||
return self.get_model(self.current_model)
|
||||
|
||||
self.current_model = model_name
|
||||
self._push_newest_model(model_name)
|
||||
|
Loading…
Reference in New Issue
Block a user