Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Web] onnxruntime-web is not work in nodejs #18933

Open
DiamondYuan opened this issue Dec 26, 2023 · 1 comment
Open

[Web] onnxruntime-web is not work in nodejs #18933

DiamondYuan opened this issue Dec 26, 2023 · 1 comment
Labels
platform:web issues related to ONNX Runtime web; typically submitted using template

Comments

@DiamondYuan
Copy link

Describe the issue

import ort from "onnxruntime-web";

const session = await ort.InferenceSession.create("modelPath", {
  executionProviders: ["wasm"],
  graphOptimizationLevel: "all",
});

this code will throw error

the worker script or module filename must be an absolute path or a relative path starting with './' or '../'. Received "blob:nodedata:02108e4e-79bb-4d8c-853d-19970c95b631"

To reproduce

import ort from "onnxruntime-web";

const session = await ort.InferenceSession.create("modelPath", {
  executionProviders: ["wasm"],
  graphOptimizationLevel: "all",
});

Urgency

No response

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.16.3

Execution Provider

'wasm'/'cpu' (WebAssembly CPU)

@DiamondYuan DiamondYuan added the platform:web issues related to ONNX Runtime web; typically submitted using template label Dec 26, 2023
fs-eire added a commit that referenced this issue Jan 17, 2024
…rted (#19179)

### Description
show warning when numThreads is set but threads is not supported.
Resolves #19148, #18933

for web: when crossOriginIsolated is false.
for node: always disable.
YUNQIUGUO pushed a commit that referenced this issue Jan 23, 2024
…rted (#19179)

### Description
show warning when numThreads is set but threads is not supported.
Resolves #19148, #18933

for web: when crossOriginIsolated is false.
for node: always disable.
@fs-eire
Copy link
Contributor

fs-eire commented Feb 16, 2024

The latest change referred above should have workaround this by forcing ort-web running in nodejs single-threaded.

siweic0 pushed a commit to siweic0/onnxruntime-web that referenced this issue May 9, 2024
…rted (microsoft#19179)

### Description
show warning when numThreads is set but threads is not supported.
Resolves microsoft#19148, microsoft#18933

for web: when crossOriginIsolated is false.
for node: always disable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:web issues related to ONNX Runtime web; typically submitted using template
Projects
None yet
Development

No branches or pull requests

2 participants