mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
fix(ml): model downloading improvements (#3988)
* handle ort `NoSuchFile` error, stricter file check * keep exception order
This commit is contained in:
@@ -131,6 +131,10 @@ class CLIPEncoder(InferenceModel):
|
||||
os.remove(file)
|
||||
return True
|
||||
|
||||
@property
|
||||
def cached(self) -> bool:
|
||||
return (self.cache_dir / "textual.onnx").is_file() and (self.cache_dir / "visual.onnx").is_file()
|
||||
|
||||
|
||||
# same as `_transform_blob` without `_blob2image`
|
||||
def _transform_pil_image(n_px: int) -> Compose:
|
||||
|
||||
Reference in New Issue
Block a user