Transformers.js error: can't find model.onnx_data file

#22
by timsek - opened

I'm having trouble initializing this model using Transformers.js / Node and the example that was provided by Xenova in the readme.

When loading the model using dtype: 'q4', the model.onnxq4 file will download to the cache, but then node crashes with no error message.

When I remove dtype altogether, I get an error from onnx runtime that it cannot locate the model.onnx_data file. I checked in the .cache and transformers only downloads the model.onnx file. As a potential solution, I downloaded the repo and all the onnx models and placed the model.onnx_data file into the cache manually, and even tried pointing the cache at a the repo folder, but the error persists:

Error: Exception during initialization: filesystem error: in file_size: No such file or directory ["model.onnx_data"]
     at new OnnxruntimeSessionHandler (/Users/timsekiguchi/recall/node_modules/onnxruntime-node/dist/backend.js:27:92)
     at Immediate.<anonymous> (/Users/timsekiguchi/recall/node_modules/onnxruntime-node/dist/backend.js:64:29)
     at process.processImmediate (node:internal/timers:483:21)

Any suggestions of where to go from here, or what might be throwing? Has the implementation included by Xenova in the readme been tested?

Thank you!

Sign up or log in to comment