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
@ -71,8 +71,9 @@ class ModelCache(object):
|
|||||||
self.models[model_name]['height'] = height
|
self.models[model_name]['height'] = height
|
||||||
self.models[model_name]['hash'] = hash
|
self.models[model_name]['hash'] = hash
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f'** model {model_name} could not be loaded: {str(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.current_model = model_name
|
||||||
self._push_newest_model(model_name)
|
self._push_newest_model(model_name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user