Check the size of a model on disk and make room for it in the cache before loading it.

This commit is contained in:
Ryan Dick 2024-08-27 15:53:50 +00:00
parent 6ba9b1b6b0
commit 77090070bd

View File

@ -72,6 +72,7 @@ class ModelLoader(ModelLoaderBase):
pass
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)
self._ram_cache.put(