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

Running onnxruntime with a gpu in nodejs? #14127

Open
noahcoolboy opened this issue Jan 4, 2023 · 4 comments
Open

Running onnxruntime with a gpu in nodejs? #14127

noahcoolboy opened this issue Jan 4, 2023 · 4 comments
Labels
ep:CUDA issues related to the CUDA execution provider feature request request for unsupported feature or enhancement platform:web issues related to ONNX Runtime web; typically submitted using template platform:windows issues related to the Windows platform

Comments

@noahcoolboy
Copy link

Describe the issue

Hello!

I'm trying to run yolov7 in nodejs but I am getting poor performance as it is using my cpu instead of my gpu.
Onnxruntime-web mentions the capability of using nodejs and gpu but when requiring it in node.js I get "Uncaught Error Error"
How would I get onnxruntime-node to run on my gpu for better performance?

Thanks!

To reproduce

I'm using yolov7-w6-pose-nms.onnx from https://github.com/trancongman276/yolov7-pose

Urgency

No response

Platform

Windows

OS Version

Windows 10

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

[email protected]

ONNX Runtime API

JavaScript

Architecture

X64

Execution Provider

CUDA

Execution Provider Library Version

No response

@github-actions github-actions bot added ep:CUDA issues related to the CUDA execution provider platform:windows issues related to the Windows platform labels Jan 4, 2023
@faxu faxu added the platform:web issues related to ONNX Runtime web; typically submitted using template label Jan 4, 2023
@fs-eire fs-eire added the feature request request for unsupported feature or enhancement label Jan 11, 2023
snnn pushed a commit that referenced this issue Aug 25, 2023
### Description
I've added changes to support CUDA and DML (only on Windows, on other
platforms it will throw an error)



### Motivation and Context
It fixes this feature request
#14127 which is tracked
here #14529

I was working on StableDiffusion implementation for node.js and it is
very slow on CPU, so GPU support is essential.

Here is a working demo with a patched and precompiled version
https://github.com/dakenf/stable-diffusion-nodejs

---------
@MountainAndMorning
Copy link

I am using the onnxruntime-node v1.16.0 on Windows. The directml and cuda provider are still not working.

@MountainAndMorning
Copy link

MountainAndMorning commented Dec 6, 2023

Still waiting for the gpu backends for onnxruntime-node@fs-eire.

@gokaybiz
Copy link

gokaybiz commented Jan 2, 2024

Is there any news @fs-eire ?

@fs-eire
Copy link
Contributor

fs-eire commented Jan 2, 2024

The team puts it as a work item in 2024 planning to working on updating the CI pipeline to include shared libraries of ONNX Runtime to support GPU EPs for Node.js binding.

kleiti pushed a commit to kleiti/onnxruntime that referenced this issue Mar 22, 2024
)

### Description
I've added changes to support CUDA and DML (only on Windows, on other
platforms it will throw an error)



### Motivation and Context
It fixes this feature request
microsoft#14127 which is tracked
here microsoft#14529

I was working on StableDiffusion implementation for node.js and it is
very slow on CPU, so GPU support is essential.

Here is a working demo with a patched and precompiled version
https://github.com/dakenf/stable-diffusion-nodejs

---------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:CUDA issues related to the CUDA execution provider feature request request for unsupported feature or enhancement platform:web issues related to ONNX Runtime web; typically submitted using template platform:windows issues related to the Windows platform
Projects
None yet
Development

No branches or pull requests

5 participants