onnxruntime-node
TypeScript icon, indicating that this package has built-in type declarations

1.22.0-rev • Public • Published

ONNX Runtime Node.js Binding

ONNX Runtime Node.js binding enables Node.js applications to run ONNX model inference.

Usage

Install the latest stable version:

npm install onnxruntime-node

Install the nightly version:

npm install onnxruntime-node@dev

Refer to ONNX Runtime JavaScript examples for samples and tutorials.

Requirements

ONNXRuntime works on Node.js v16.x+ (recommend v20.x+) or Electron v15.x+ (recommend v28.x+).

The following table lists the supported versions of ONNX Runtime Node.js binding provided with pre-built binaries.

EPs/Platforms Windows x64 Windows arm64 Linux x64 Linux arm64 MacOS x64 MacOS arm64
CPU ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
WebGPU ✔️ [1] ✔️ [1] ✔️ [1] ✔️ [1] ✔️ [1] ✔️ [1]
DirectML ✔️ ✔️
CUDA ✔️[2]
CoreML ✔️ ✔️
  • [1]: WebGPU support is currently experimental.
  • [2]: CUDA v12. See CUDA EP Installation for details.

To use on platforms without pre-built binaries, you can build Node.js binding from source and consume it by npm install <onnxruntime_repo_root>/js/node/. See also instructions for building ONNX Runtime Node.js binding locally.

GPU Support

Right now, the Windows version supports WebGPU execution provider and DML execution provider. Linux x64 can use CUDA and TensorRT.

CUDA EP Installation

To use CUDA EP, you need to install the CUDA EP binaries. By default, the CUDA EP binaries are installed automatically when you install the package. If you want to skip the installation, you can pass the --onnxruntime-node-install=skip flag to the installation command.

npm install onnxruntime-node --onnxruntime-node-install=skip

You can also use this flag to specify the version of the CUDA: (v11 or v12) CUDA v11 is no longer supported since v1.22.

License

License information can be found here.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.22.0-rev1,775latest
1.23.0-dev.20250703-7fc623586185dev

Version History

VersionDownloads (Last 7 Days)Published
1.23.0-dev.20250703-7fc623586185
1.23.0-dev.20250612-70f14d76709
1.23.0-dev.20250602-03b22ffc425
1.22.0-rev1,775
1.23.0-dev.20250522-ad7b0e368d58
1.23.0-dev.20250515-00bd398d542
1.23.0-dev.20250509-3dc91e6c310
1.22.02,830
1.21.13,346
1.22.0-dev.20250418-c19a49615b5
1.22.0-dev.20250415-c18e06d5e30
1.21.081,767
1.21.0-dev.20250306-e0b66cad287
1.21.0-dev.20250228-beb1a9242e1
1.20.142,716
1.21.0-dev.20241112-cdc8db99840
1.20.0512
1.20.0-dev.20241022-2d00351d7b0
1.19.24,256
1.19.0759
1.19.0-dev.20240804-ee2fe87e2d1
1.18.02,992
1.18.0-dev.20240430-204f1f59b90
1.17.3-rev.189
1.17.32,522
1.17.01,312
1.17.0-dev.20240118-a63b71eadb0
1.17.0-dev.20240117-81d363045b0
1.16.3594
1.16.2188
1.16.1385
1.16.05
1.16.0-dev.20230908-a9df3aea720
1.16.0-dev.20230820-cbaa0083910
1.16.0-dev.20230704-d540c7da0f0
1.15.113,895
1.16.0-dev.20230606-f0139658311
1.15.019
1.15.0-dev.20230502-abdd4f518a0
1.15.0-dev.20230430-31e7d3d7d40
1.14.1-dev.20230322-ab8a1ad4370
1.15.0-dev.20230317-e42f7487df0
1.15.0-dev.20230212-12d91173c40
1.14.0102,979
1.15.0-dev.20230131-e2dd1315c70
1.14.0-dev.20230119-b51415b0ea8
1.14.0-dev.20221124-4ca62b9ee80
1.13.11
1.13.0-dev.20221007-f4b944e1a0
1.13.0-dev.20221001-0cf17b1920
1.13.0-dev.20220927-94e34ace10
1.13.0-dev.20220904-ac4f1bf960
1.13.0-dev.20220812-95f2a3e7e0
1.13.0-dev.20220808-bdd6b00c90
1.12.195
1.12.021
1.12.0-dev.20220708-c6732c0790
1.12.0-dev.20220707-62226d0300
1.12.0-dev.20220614-f6d2b629a0
1.12.0-dev.20220607-40d2c98e40
1.12.0-dev.20220520-e3a2d5cca0
1.12.0-dev.20220517-4dd3cc40c0
1.12.0-dev.20220516-c556f5f221
1.12.0-dev.20220510-3437967e60
1.12.0-dev.20220505-084165c740
1.12.0-dev.20220429-49d7050b80
1.11.026
1.11.0-dev.20220318-b713855a91
1.11.0-dev.20220228-eb116595d0
1.11.0-dev.20220220-4d3cd2f680
1.11.0-dev.20220217-8d06e5a9d1
1.11.0-dev.20220129-baa1767920
1.11.0-dev.20220124-3dfadf9030
1.11.0-dev.20211230-d5742f3a41
1.11.0-dev.20211224-f780f06240
1.11.0-dev.20211222-05d20343e0
1.11.0-dev.20211218-bd4fb4c5d0
1.11.0-dev.20211216-44c7011920
1.10.0-dev.20211211-d0b08af370
1.10.01
1.10.0-dev.20211124-a3ebc5e080
1.10.0-dev.20211122-bcc6ab29f1
1.10.0-dev.20211118-1aa21df140
1.10.0-dev.20211114-6e09fc5150
1.10.0-dev.20211108-1151c661e1
1.9.00
1.8.2-dev.20210826.00
1.8.0-dev.20210608.00
1.8.00
1.7.0-dev.41
1.7.0-dev.00

Package Sidebar

Install

npm i onnxruntime-node

Weekly Downloads

263,274

Version

1.22.0-rev

License

MIT

Unpacked Size

247 MB

Total Files

44

Last publish

Collaborators

  • eire
  • onnxruntime