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

[Web] The ONNX model cannot be loaded via WASM in the IOS17 browser. #22086

Open
zyhhahah opened this issue Sep 13, 2024 · 4 comments
Open

[Web] The ONNX model cannot be loaded via WASM in the IOS17 browser. #22086

zyhhahah opened this issue Sep 13, 2024 · 4 comments
Labels
platform:mobile issues related to ONNX Runtime mobile; typically submitted using template platform:web issues related to ONNX Runtime web; typically submitted using template

Comments

@zyhhahah
Copy link

Describe the issue

This is the encountered error, which only occurs in the web environment on the iPhone.
Snipaste_2024-09-13_11-14-25
I initially thought this issue was caused by version differences, so I tried many versions. They all worked fine in the web environment on Android and Windows. Based on the error message, it seems to be caused by insufficient memory. I tried many different models, including some very small ones, but the issue persisted. However, I found that when using the WebGL backend, the issue does not occur. It only happens with the WASM backend.

To reproduce

In my project, the code is quite complex, so I simplified it following the official example to reproduce the issue. The model used can be any ONNX model. The devices I tested on include iPhone 13 Pro, iPhone 13 Pro Max, and iPhone 15 Pro Max, and the issue occurred on all of them.
image

Urgency

My project is currently at a standstill due to this issue, and I'm not sure whether it's a problem with my implementation or a version-related issue. I'm wondering if I'm the only one encountering this problem.

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

多版本都存在这个问题

Execution Provider

'webgl' (WebGL), 'wasm'/'cpu' (WebAssembly CPU)

@zyhhahah zyhhahah added the platform:web issues related to ONNX Runtime web; typically submitted using template label Sep 13, 2024
@github-actions github-actions bot added the platform:mobile issues related to ONNX Runtime mobile; typically submitted using template label Sep 13, 2024
@zyhhahah zyhhahah changed the title [Web] The ONNX model cannot be loaded via WASM in the iPhone browser. [Web] The ONNX model cannot be loaded via WASM in the IOS17 browser. Sep 13, 2024
@transcranial
Copy link

transcranial commented Sep 15, 2024

We are also seeing this exact error with onnxruntime-web 1.19.0, running a tiny model in all browsers on iOS 17.6.1 as well as iPadOS 17.6.1. Works fine in all browsers including safari on macOS. Downgrading onnxruntime-web to 1.18.0 fixes this for us.

@satyajandhyala
Copy link
Contributor

The Out of Memory error was previously reported and fixed by rolling back Emscripten SDK upgrade, backe to 3.1.59. Did reproduce this error with the latest code on main branch?

@zyhhahah
Copy link
Author

我们在 onnxruntime-web 1.19.0 中也看到了同样的错误,在 iOS 17.6.1 和 iPadOS 17.6.1 上的所有浏览器中运行了一个小模型。在包括 macOS 上的 Safari 在内的所有浏览器中都可以正常工作。将 onnxruntime-web 降级到 1.18.0 可以为我们解决这个问题。

Thank you for your help. The issue indeed doesn't exist in version 1.18.0, it seems I carelessly missed this during my earlier attempts. I really appreciate your reminder.

@zyhhahah
Copy link
Author

之前曾报告过内存不足错误,并通过将 Emscripten SDK 升级回滚到 3.1.59 来修复。是否使用主分支上的最新代码重现了此错误?

Hello, I tried using the latest code as per your suggestion. Unfortunately, the same error still occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:mobile issues related to ONNX Runtime mobile; typically submitted using template platform:web issues related to ONNX Runtime web; typically submitted using template
Projects
None yet
Development

No branches or pull requests

3 participants