Skip to content

Commit 5b1b80a

Browse files
Change os.path to pathlib Path (#6737)
Change os.path to pathlib
1 parent 8581d9b commit 5b1b80a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/pipelines/onnx_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def _from_pretrained(
172172
# load model from local directory
173173
if os.path.isdir(model_id):
174174
model = OnnxRuntimeModel.load_model(
175-
os.path.join(model_id, model_file_name), provider=provider, sess_options=sess_options
175+
Path(model_id, model_file_name).as_posix(), provider=provider, sess_options=sess_options
176176
)
177177
kwargs["model_save_dir"] = Path(model_id)
178178
# load model from hub

0 commit comments

Comments
 (0)