diff --git a/lama_cleaner/model_manager.py b/lama_cleaner/model_manager.py index 549b307..ab31b1b 100644 --- a/lama_cleaner/model_manager.py +++ b/lama_cleaner/model_manager.py @@ -46,8 +46,8 @@ class ModelManager: if (torch.cuda.memory_allocated() > 0): # Clear current loaded model from memory torch.cuda.empty_cache() - gc.collect() del self.model + gc.collect() self.model = self.init_model(new_name, self.device, **self.kwargs) self.name = new_name