-
Notifications
You must be signed in to change notification settings - Fork 751
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
What does "Error: failed to call OrtRun(). error code = 6." mean? I know it is ONNX related, but how to fix? #732
Comments
Hi there 👋 error code 6 is usually related to out-of-memory issues. Can you provide the code you are running (as well as the model being used)? |
Model I was trying to use was whisper medium.
|
Note that every single call to const transcriber = await pipeline('automatic-speech-recognition', 'Xenova/whisper-medium'); allocates new memory for a pipeline (and takes a lot of time to construct the model). This is most likely the reason for your out-of-memory issues, since you call this every time you transcribe audio. I would also recommend selecting a smaller model, like https://huggingface.co/Xenova/whisper-base, https://huggingface.co/Xenova/whisper-small, https://huggingface.co/Xenova/whisper-tiny, https://huggingface.co/distil-whisper/distil-medium.en, or https://huggingface.co/distil-whisper/distil-small.en. Hope that helps! |
That's good to know. I'll give those other models a shot. However this happens on the first call. The dev machine i'm trying to run it in has a RTX 4090. I'm surprised that's the issue, since i've never run into memory problems when running whisper in python. Does WebGPU have a memory ceiling? Thanks for your help. |
Assuming you are running Transformers.js v2, everything still runs with WASM/CPU. You can follow along with the development of v3 here, which will add WebGPU support. |
Gotcha. Now it all makes sense. I'll be keeping my eye on v3. Thanks for the patience and good luck with all the work ahead. |
Question
I keep running into the same issue when using transformers.js Automatic Speech Recognition pipeline. I've tried solving it multiple ways. But pretty much hit a wall every time. I've done lots of googling, LLMs, and used my prior knowledge of how this stuff functions in python. But I can't seem to get it to work.
I've tried setting up my environment with and without vite. I've tried with react javascript. I've tried with with react typescript. Nothing.
Am i missing a dependency or something? is there a place I can find what the error code means? because I couldn't find it anywhere.
I've fed it an array. I've fed it a .wav file. Nothing works. No matter what I do. No matter if it's an array or a wav file. I always get the same error:
It seems to be a ONNX Runtime issue. But don't know how to fix it. Any guidance will be appreciated.
Note: I'm currently testing with English. Nothing fancy.
The text was updated successfully, but these errors were encountered: