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

[WebGPU/js] failed to inference ONNX model: Error: [WebGPU] Kernel "[Add] /decoder/F0.1/Add" failed. Error: Can't perform binary op on the given tensors. - Kokoro TTS #23403

Open
xenova opened this issue Jan 17, 2025 · 2 comments
Labels
ep:WebGPU ort-web webgpu provider platform:web issues related to ONNX Runtime web; typically submitted using template

Comments

@xenova
Copy link

xenova commented Jan 17, 2025

Describe the issue

Unable to run https://huggingface.co/onnx-community/Kokoro-82M-ONNX on WebGPU

2025-01-17 02:57:22.385599 [E:onnxruntime:, sequential_executor.cc:505 ExecuteKernel] Non-zero status code returned while running Add node. Name:'/decoder/F0.1/Add' Status Message: Failed to run JSEP kernel

The nodes are two float32 tensors, so I don't see why this should cause an issue.

Image

cc @guschmue

To reproduce

https://jsfiddle.net/hj9wfn36/

Urgency

Blocks WebGPU support for Transformers.js and kokoro-js

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.21.0-dev.20250114-228dd16893

Execution Provider

'webgpu' (WebGPU)

@xenova xenova added the platform:web issues related to ONNX Runtime web; typically submitted using template label Jan 17, 2025
@xenova xenova changed the title [WebGPU/js] failed to inference ONNX model: Error: [WebGPU] Kernel "[Add] /decoder/F0.1/Add" failed. Error: Can't perform binary op on the given tensors. [WebGPU/js] failed to inference ONNX model: Error: [WebGPU] Kernel "[Add] /decoder/F0.1/Add" failed. Error: Can't perform binary op on the given tensors. - Kokoro TTS Jan 17, 2025
@github-actions github-actions bot added .NET Pull requests that update .net code ep:WebGPU ort-web webgpu provider labels Jan 17, 2025
@guschmue guschmue removed the .NET Pull requests that update .net code label Jan 17, 2025
@maifeeulasad
Copy link

Input shape:

  • float32[unk__413, 256, unk__415]
  • float32[unk__416, 256, unk__418]

I think the size is incompatible for Add operation.

But it's weird when it's working CPU but failing in GPU.

@guschmue
Copy link
Contributor

guschmue commented Jan 17, 2025

yes, one of the input shapes for add (coming from the conv) is 1 off.

inputA [1,269,256]
inputB [1,270,256]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:WebGPU ort-web webgpu provider platform:web issues related to ONNX Runtime web; typically submitted using template
Projects
None yet
Development

No branches or pull requests

3 participants