diff --git a/frigate/embeddings/functions/onnx.py b/frigate/embeddings/functions/onnx.py index 3b2d8724d..abdac7aef 100644 --- a/frigate/embeddings/functions/onnx.py +++ b/frigate/embeddings/functions/onnx.py @@ -119,14 +119,16 @@ class GenericONNXEmbedding: def _load_tokenizer(self): tokenizer_path = os.path.join(f"{MODEL_CACHE_DIR}/{self.model_name}/tokenizer") return AutoTokenizer.from_pretrained( - tokenizer_path, clean_up_tokenization_spaces=True + self.model_name, cache_dir=tokenizer_path, clean_up_tokenization_spaces=True ) def _load_feature_extractor(self): feature_extractor_path = os.path.join( f"{MODEL_CACHE_DIR}/{self.model_name}/feature_extractor" ) - return AutoFeatureExtractor.from_pretrained(feature_extractor_path) + return AutoFeatureExtractor.from_pretrained( + self.model_name, cache_dir=feature_extractor_path + ) def _load_model(self, path: str, providers: List[str]): if os.path.exists(path):