-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Safari webworker Error when getting WebGL Context
#8267
Comments
Hi, @neurolabusc I apologize for the delay in my response. I tested the live demo using Thank you for your cooperation and patience. |
@gaikwadrahul8 thanks for checking. I still observe the error with Safari 17.5 when I choose the You can run the
Also, after the brainchop model finishes, you can press
|
@gaikwadrahul8 this issue seems to be resolved with MacOS 14.5. I have a colleague who ran web workers on a very similar MacBook to me with with Safari 17.4 and MacOS 14. I was unsuccessful on my machine with MacOS 13.6 and Safari 17.5. I then updated my computer to MacOS 14.5 and immediately ran brainchop and things work fine. Safari still claims to be 17.5. Based on this finding, I am closing this issue. Thanks for your quick work. |
While All major browsers now support OffscreenCanvas, tfjs fails to create a WebGL backend on a MacOS computer running a webworker with Safari, even though the WebGL backend works on the main thread. On the same machine, Chrome and Firefox work correctly both on the main thread and on a web worker.
You can try this out in this live demo
Alternatively, you build a hot-loading example
In both cases, a model is run when you select a
Segmentation model
from the drop down menu (hint: choose theFast
ones to get a rapid solution).System information
Describe the current behavior
Models work in main thread for Chrome, Firefox and Safari. Webworker only works for Chrome and Firefox. Safari webworker reports
Initialization of backend webgl failed
Describe the expected behavior
Since all browsers now support OffscreenCanvas, webworkers should work on all devices. Safari explicitly reports supporting offscreen canvases when running this code snippet:
Standalone code to reproduce the issue
You can try this out in this live demo
Alternatively, you build a hot-loading example
Other info / logs
The text was updated successfully, but these errors were encountered: