Fix silent SystemExit if embedding_path is not specified

This commit is contained in:
Sean McLellan 2022-08-23 22:45:02 -04:00
parent 84989f0d05
commit 24b11ecf9f

View File

@ -436,7 +436,8 @@ The vast majority of these arguments default to reasonable values.
config = OmegaConf.load(self.config)
self.device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
model = self._load_model_from_config(config,self.weights)
model.embedding_manager.load(self.embedding_path)
if not self.embedding_path is None:
model.embedding_manager.load(self.embedding_path)
self.model = model.to(self.device)
except AttributeError:
raise SystemExit