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

Failure with OpenvinoEP within ORT #17499

Open
lalith-mcw opened this issue Sep 11, 2023 · 7 comments
Open

Failure with OpenvinoEP within ORT #17499

lalith-mcw opened this issue Sep 11, 2023 · 7 comments
Labels
ep:OpenVINO issues related to OpenVINO execution provider platform:windows issues related to the Windows platform

Comments

@lalith-mcw
Copy link

Describe the issue

Facing issues with StableDiffusionPipeline in diffusers, trying to inference with OpenvinoEP using the following snippet

options = SessionOptions()
options.graph_optimization_level = GraphOptimizationLevel.ORT_DISABLE_ALL
OnnxStableDiffusionPipeline.from_pretrained(self.model, revision="onnx", provider="OpenVINOExecutionProvider", provider_options=[{'device_type' : 'CPU_FP32'}], sess_options = options)

And facing the following issue with the same, issue is specific to WSL/Ubuntu systems and not receiving the same when inferenced via Windows

onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Non-zero status code returned while running OpenVINO-EP-subgraph_4 node. Name:'OpenVINOExecutionProvider_OpenVINO-EP-subgraph_4_0' Status Message: /home/onnxruntimedev/onnxruntime/onnxruntime/core/providers/openvino/ov_interface.cc:53 onnxruntime::openvino_ep::OVExeNetwork onnxruntime::openvino_ep::OVCore::LoadNetwork(const string&, std::string&, ov::AnyMap&, std::string) [OpenVINO-EP]  Exception while Loading Network for graph: OpenVINOExecutionProvider_OpenVINO-EP-subgraph_4_0Check 'false' failed at src/inference/src/core.cpp:149:
invalid external data: ExternalDataInfo(data_full_path: weights.pb, offset: 46080, data_length: 1280)

To reproduce

options = SessionOptions()
options.graph_optimization_level = GraphOptimizationLevel.ORT_DISABLE_ALL
OnnxStableDiffusionPipeline.from_pretrained(self.model, revision="onnx", provider="OpenVINOExecutionProvider", provider_options=[{'device_type' : 'CPU_FP32'}], sess_options = options)

Urgency

Planning to test the performance of Openvino EP with InvokeAI pipeline and provide a PR for the same

Platform

Linux

OS Version

20.04

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.15.1

ONNX Runtime API

Python

Architecture

X64

Execution Provider

OpenVINO

Execution Provider Library Version

Onnxruntime-openvino == 1.15.0 & openvino == 2023.0

@github-actions github-actions bot added ep:OpenVINO issues related to OpenVINO execution provider platform:windows issues related to the Windows platform labels Sep 11, 2023
@jywu-msft
Copy link
Member

+@sfatimar , @sspintel any ideas?

@lalith-mcw
Copy link
Author

Any suggestions on this ? @sfatimar @sspintel @jywu-msft

@sspintel
Copy link
Contributor

Hi @lalith-mcw

I need more information on the model used here, what's self.model? The error seems to indicate something's invalid with the model used here.

@lalith-mcw
Copy link
Author

Trying to run the Stable diffusion pipeline with this model

here self.model is the unet model and the weights file is exported via external_data and the same is available within unet\

@lalith-mcw
Copy link
Author

Hi @lalith-mcw

I need more information on the model used here, what's self.model? The error seems to indicate something's invalid with the model used here.

@sspintel this issue is specific to OpenvinoExecutionProvider how to add alternate path for weights file or ExternalInitializers with the inference session. The issue is resolved when the weights file is moved to the directory of script execution.

@NicoLivesey
Copy link

I have been through the exact same issue and indeed the only solution I found was to place the weights file at the same location that my script to make it work 🤯

@sspintel
Copy link
Contributor

sspintel commented Jan 8, 2024

We've fixed the issue with the loading of external weights in a recent PR #18596. Please try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:OpenVINO issues related to OpenVINO execution provider platform:windows issues related to the Windows platform
Projects
None yet
Development

No branches or pull requests

4 participants