Skip to content

Commit

Permalink
[hotfix] fix session option access in Node.js binding (#17762)
Browse files Browse the repository at this point in the history
### Description
fix session option access in Node.js binding


### Motivation and Context
This is a bug that affect transformer.js using ONNX Runtime Node.js
binding. Issue: #17377

This bug is already fixed in main branch, but it is not picked in 1.16
release.
  • Loading branch information
fs-eire authored Oct 4, 2023
1 parent 6df4211 commit f480a36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/node/src/inference_session_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Napi::Value InferenceSessionWrap::LoadModel(const Napi::CallbackInfo &info) {
int64_t bytesOffset = info[1].As<Napi::Number>().Int64Value();
int64_t bytesLength = info[2].As<Napi::Number>().Int64Value();

ParseSessionOptions(info[1].As<Napi::Object>(), sessionOptions);
ParseSessionOptions(info[3].As<Napi::Object>(), sessionOptions);
this->session_.reset(
new Ort::Session(OrtEnv(), reinterpret_cast<char *>(buffer) + bytesOffset, bytesLength, sessionOptions));
} else {
Expand Down

0 comments on commit f480a36

Please sign in to comment.