Skip to content

Commit

Permalink
[Fix] pathlib issue windows with older onnxruntime versions (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 authored Jan 15, 2025
1 parent e08ff57 commit 14d7b03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions onnxtr/models/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ class Engine:
def __init__(self, url: str, engine_cfg: EngineConfig | None = None, **kwargs: Any) -> None:
engine_cfg = engine_cfg if isinstance(engine_cfg, EngineConfig) else EngineConfig()
archive_path = download_from_url(url, cache_subdir="models", **kwargs) if "http" in url else url
# NOTE: older onnxruntime versions require a string path for windows
archive_path = rf"{archive_path}"
# Store model path for each model
self.model_path = archive_path
self.session_options = engine_cfg.session_options
Expand Down

0 comments on commit 14d7b03

Please sign in to comment.