mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Check the size of a model on disk and make room for it in the cache before loading it.
This commit is contained in:
parent
6ba9b1b6b0
commit
77090070bd
@ -72,6 +72,7 @@ class ModelLoader(ModelLoaderBase):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
config.path = str(self._get_model_path(config))
|
config.path = str(self._get_model_path(config))
|
||||||
|
self._ram_cache.make_room(self.get_size_fs(config, Path(config.path), submodel_type))
|
||||||
loaded_model = self._load_model(config, submodel_type)
|
loaded_model = self._load_model(config, submodel_type)
|
||||||
|
|
||||||
self._ram_cache.put(
|
self._ram_cache.put(
|
||||||
|
Loading…
Reference in New Issue
Block a user