gtbluesky / onnxruntime_flutter

A flutter plugin for OnnxRuntime provides an easy, flexible, and fast Dart API to integrate Onnx models in flutter apps across mobile and desktop platforms.
MIT License
54 stars 13 forks source link

Instantiate _isolateSession when created fromAddress #8

Closed vishnukvmd closed 6 months ago

vishnukvmd commented 6 months ago

Unbreaks release() for OrtSessions created fromAddress

gtbluesky commented 6 months ago

OrtSession.fromAddress should not be used externally.

vishnukvmd commented 6 months ago

In cases where we are creating the OrtSession from a different isolate (to prevent jank while reading the model file), and if we have to run an inference later, isn't fromAddress the best way to recreate the session?

If there's a better way, please let me know!

Thank you!

gtbluesky commented 6 months ago

Try the 1.3.0