We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The offending line is
onnxruntime/js/common/lib/tensor-factory-impl.ts
Line 155 in bd60add
instanceof HTMLCanvasElement fails because HTMLCanvasElement does not exist in a worker.
instanceof HTMLCanvasElement
Adding some typeof HTMLCanvasElement !== undefined && in the if statement, should fix it
typeof HTMLCanvasElement !== undefined &&
The text was updated successfully, but these errors were encountered:
As long as the patch is not yet merged, a quick solution is to add the following line to your code:
globalThis.HTMLCanvasElement = OffscreenCanvas
Sorry, something went wrong.
3494f80
Successfully merging a pull request may close this issue.
The offending line is
onnxruntime/js/common/lib/tensor-factory-impl.ts
Line 155 in bd60add
instanceof HTMLCanvasElement
fails because HTMLCanvasElement does not exist in a worker.Adding some
typeof HTMLCanvasElement !== undefined &&
in the if statement, should fix itThe text was updated successfully, but these errors were encountered: