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

Onnx model throws an exception in 1.17.3 but works in 1.16.x #20514

Open
nmetulev opened this issue Apr 29, 2024 · 1 comment
Open

Onnx model throws an exception in 1.17.3 but works in 1.16.x #20514

nmetulev opened this issue Apr 29, 2024 · 1 comment

Comments

@nmetulev
Copy link
Member

Describe the issue

Model: https://github.com/snakers4/silero-vad/tree/master/files

I'm trying to use this onnx model in my .NET Core WinAppSdk application with OnnxRuntime 1.17.3, which throws the following exception on inference. Running the exact same model and code with 1.16.x works as expected and no exception is thrown.

[ErrorCode:Fail] Non-zero status code returned while running If node. Name:'If_25' Status Message: if.cc:266 onnxruntime::If::Compute If nodes condition input must have exactly one element
   at Microsoft.ML.OnnxRuntime.NativeApiStatus.VerifySuccess(IntPtr nativeStatus)
   at Microsoft.ML.OnnxRuntime.InferenceSession.RunImpl(RunOptions options, IntPtr[] inputNames, IntPtr[] inputValues, IntPtr[] outputNames)
   at Microsoft.ML.OnnxRuntime.InferenceSession.Run(IReadOnlyCollection`1 inputs, IReadOnlyCollection`1 outputNames, RunOptions options)
   at Microsoft.ML.OnnxRuntime.InferenceSession.Run(IReadOnlyCollection`1 inputs, IReadOnlyCollection`1 outputNames)
   at Microsoft.ML.OnnxRuntime.InferenceSession.Run(IReadOnlyCollection`1 inputs)
   at TextPad.VoiceRecognition.VoiceActivity.SlieroVadOnnxModel.Call(Single[][] x, Int32 sr) in F:\source\TextPad\TextPad.Whisper\whisper\VoiceActivity\SlieroVadOnnxModel.cs:line 116
   at TextPad.VoiceRecognition.VoiceActivity.SlieroVadDetector.Apply(Byte[] data, Boolean returnSeconds) in F:\source\TextPad\TextPad.Whisper\whisper\VoiceActivity\SlieroVadDetector.cs:line 61

image

To reproduce

You can use this project to repro: https://github.com/microsoft/Windows-DevRel/tree/gleb/AudioEditor-libs/Projects/AudioEditor
Uncomment this line: https://github.com/microsoft/Windows-DevRel/blob/gleb/AudioEditor-libs/Projects/AudioEditor/MainWindow.xaml.cs#L39

Feel free to reach out to me and I'm happy to walk through it to repro as well.

Urgency

No response

Platform

Windows

OS Version

22h2

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.17.3

ONNX Runtime API

C#

Architecture

X64

Execution Provider

Default CPU

Execution Provider Library Version

No response

@github-actions github-actions bot added the platform:windows issues related to the Windows platform label Apr 29, 2024
@yuslepukhin
Copy link
Member

There was a change recently that exposes this model problem. Check your model to see if the given If node has an input with more than one element.

@sophies927 sophies927 added release:1.17.3 and removed platform:windows issues related to the Windows platform labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants