From 33957af8c67ac04e8932b2d093b502b33bf9d1de Mon Sep 17 00:00:00 2001 From: Ella Charlaix Date: Tue, 19 Sep 2023 17:48:32 +0200 Subject: [PATCH] fix --- optimum/onnxruntime/modeling_decoder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/optimum/onnxruntime/modeling_decoder.py b/optimum/onnxruntime/modeling_decoder.py index 732597d9308..511132171a1 100644 --- a/optimum/onnxruntime/modeling_decoder.py +++ b/optimum/onnxruntime/modeling_decoder.py @@ -1023,7 +1023,8 @@ def _from_pretrained( except EntryNotFoundError: # model doesn't use external data pass - new_model_save_dir = Path(model_cache_path).parent + model_cache_path = Path(model_cache_path) + new_model_save_dir = model_cache_path.parent preprocessors = maybe_load_preprocessors(model_id, subfolder=subfolder) # model_save_dir can be provided in kwargs as a TemporaryDirectory instance, in which case we want to keep it