do not ignore keyboard interrupt while scanning models

This commit is contained in:
Lincoln Stein
2023-09-30 14:21:39 -04:00
parent c025c9c4ed
commit 230ee18536

View File

@ -180,6 +180,8 @@ class ModelSearch(ModelSearchBase):
self._scanned_dirs.add(path)
try:
self.model_found(path)
except KeyboardInterrupt:
raise
except Exception as e:
self.logger.warning(str(e))
@ -190,5 +192,7 @@ class ModelSearch(ModelSearchBase):
if path.suffix in {".ckpt", ".bin", ".pth", ".safetensors", ".pt"}:
try:
self.model_found(path)
except KeyboardInterrupt:
raise
except Exception as e:
self.logger.warning(str(e))