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

[Stable Diffusion1_5][WebNN GPU] Failed to execute 'add' on 'MLGraphBuilder': The input operand data types don't match. #16

Closed
JiangYueBook opened this issue Jul 17, 2024 · 3 comments

Comments

@JiangYueBook
Copy link

Repro Steps:

  1. Launch latest Chrome Canary on Windows 11
    C:\Users\AppData\Local\Google\Chrome SxS\Application\chrome.exe" --enable-features=WebMachineLearningNeuralNetwork

  2. Visit https://microsoft.github.io/webnn-developer-preview/demos/stable-diffusion-1.5/

  3. Click Load Models button.

Actual Result:

   TypeError: Failed to execute 'add' on 'MLGraphBuilder': The input operand data types don't match. (The error occur when text encode begin to create session.)

Environment:

Chrome Canary: 128.0.6600.0 (Official Build)

GPU Driver Version: 32.0.101.5762

Device OS CPU GPU
Laptop Windows 11 23H2 Ultra 7 155H Intel Arc Graphics
@ibelem
Copy link
Contributor

ibelem commented Jul 17, 2024

Caused by argMax change: chromium-review.googlesource.com/c/chromium/src/+/5692538

@huningxin
Copy link

huningxin commented Jul 17, 2024

Caused by argMax change: chromium-review.googlesource.com/c/chromium/src/+/5692538

Yes, this is caused by argMax default output data type is "int32" in Chromium prototype now. WebNN EP should set the newly introduced MLArgMinMaxOptions.outputDataType to "int64" for ONNX ArgMax whose output is "int64". This is the same root cause for #17.

@Honry has a fix for WebNN EP: microsoft/onnxruntime#21385

@philloooo, would you plan to send a spec change?

/cc @fdwr

@fdwr
Copy link
Collaborator

fdwr commented Jul 18, 2024

@philloooo, would you plan to send a spec change?

WebNN spec update for argMin/argMax is here for single axis: https://github.com/webmachinelearning/webnn/pull/724/files
Maybe we should add the outputDataType in that same one?
I'm fine with it being separate too.

(update 1) Never mind, as the above was just merged, and so we need a new separate spec CR for adding outputDataType.

(update 2) Spec change here: webmachinelearning/webnn#730

(update 3) ORT WebNN EP updated: "Add outputDataType option for the ArgMax/ArgMin ops" microsoft/onnxruntime#21385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants