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

"model_path must not be empty" for valid file #37

Open
guyluz11 opened this issue Jan 9, 2025 · 0 comments
Open

"model_path must not be empty" for valid file #37

guyluz11 opened this issue Jan 9, 2025 · 0 comments

Comments

@guyluz11
Copy link

guyluz11 commented Jan 9, 2025

I have used the example project and added model.onnx from https://huggingface.co/pszemraj/bigbird-pegasus-large-K-booksum under assets/models.

Then I have replaced this line
const assetFileName = 'assets/models/silero_vad.onnx';

with
const assetFileName = 'assets/models/model.onnx';

And getting an error about loading the model:

2025-01-09 09:56:25.374262135 [E:onnxruntime:, inference_session.cc:1644 operator()] Exception during initialization: /onnxruntime_src/onnxruntime/core/optimizer/initializer.cc:30 onnxruntime::Initializer::Initializer(const onnx::TensorProto&, const onnxruntime::Path&) !model_path.IsEmpty() was false. model_path must not be empty. Ensure that a path is provided when the model is created or loaded.

[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: code=6, message=Exception during initialization: /onnxruntime_src/onnxruntime/core/optimizer/initializer.cc:30 onnxruntime::Initializer::Initializer(const onnx::TensorProto&, const onnxruntime::Path&) !model_path.IsEmpty() was false. model_path must not be empty. Ensure that a path is provided when the model is created or loaded.

#0      OrtStatus.checkOrtStatus (package:onnxruntime/src/ort_status.dart:29:5)
#1      new OrtSession.fromBuffer (package:onnxruntime/src/ort_session.dart:62:15)
#2      VadIterator.initModel (package:onnxruntime_example/vad_iterator.dart:72:27)
<asynchronous suspension>

Running on Linux, the original model works.

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

1 participant