Skip to content

[Web] Allow passing ArrayBuffers as an alternative to env.wasmPaths #27110

@scblaze

Description

@scblaze

Describe the issue

onnx runtime web loads the WASM-related JS and WASM files dynamically. The paths to the files are controlled by env.wasmPaths.

It would be helpful to have further control over the loading by allowing the developer to provide ArrayBuffers directly for the contents of the .mjs file and the .wasm file. (Maybe env.wasmFiles?).

You can already provide either a string path or an ArrayBuffer for the model you are loading, so this change would be aligned with that behavior.

To reproduce

N/A

Urgency

No response

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

onnxruntime-web 1.23.2

Execution Provider

'wasm'/'cpu' (WebAssembly CPU)

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform:webissues related to ONNX Runtime web; typically submitted using template

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions