Skip to content

st-zrt 0.4.1: external-data resolution for byte-loaded models - #13

Merged
Sed21 merged 3 commits into
mainfrom
feat/st-zrt-0.4.1-external-data
Sep 2, 2026
Merged

Sed21 merged 3 commits into
mainfrom
feat/st-zrt-0.4.1-external-data

Conversation

@Sed21

@Sed21 Sed21 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Models with ONNX external-data initializers (every model over the 2 GiB protobuf limit) previously could not be loaded from memory: ORT resolves external-data paths relative to the model file's directory, which a buffer has no way to supply.

Adds Session::from_bytes_with_external_data(model_data, external_data_dir, ..) and ModelCompilationOptions::set_input_model_from_buffer_with_external_data(..): the serialized model is spooled to a unique temporary file inside the caller-supplied external-data directory and loaded through the path-based API; the temp file is owned by the session (or a guard returned to the compile caller) and removed on drop. from_bytes is unchanged for self-contained models.

Committed fixture (tiny external-data model) plus tests: resolved byte load matches the path-based reference output, spool cleanup verified, and the unresolved plain-buffer behavior documented.

@Sed21
Sed21 merged commit 838c022 into main Sep 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant