I get an error trying to load this, I used the template code but i am working in a repo that had a previous version of Xenova/transformers, although ive updated that now to latest.
ort-wasm-simd.wasm:0x82c2bc D:/a/_work/1/s/onnxruntime/core/graph/model.cc:146 onnxruntime::Model::Model(ModelProto &&, const PathString &, const IOnnxRuntimeOpSchemaRegistryList *, const logging::Logger &, const ModelOptions &) Unsupported model IR version: 9, max supported IR version: 8
lt @ @xenova_transformers.js?v=d34ae9a5:2314
P @ @xenova_transformers.js?v=d34ae9a5:2628
$func11504 @ ort-wasm-simd.wasm:0x82c2bc
$func2149 @ ort-wasm-simd.wasm:0x16396e
$func584 @ ort-wasm-simd.wasm:0x48a63
$func11428 @ ort-wasm-simd.wasm:0x8296b1
$func631 @ ort-wasm-simd.wasm:0x4d0e8
v @ @xenova_transformers.js?v=d34ae9a5:2756
$func92 @ ort-wasm-simd.wasm:0xb052
o @ @xenova_transformers.js?v=d34ae9a5:2720
$func339 @ ort-wasm-simd.wasm:0x28ce8
$Ra @ ort-wasm-simd.wasm:0x6ebffb
e2._OrtCreateSession @ @xenova_transformers.js?v=d34ae9a5:3046
e.createSessionFinalize @ @xenova_transformers.js?v=d34ae9a5:14504
e.createSession @ @xenova_transformers.js?v=d34ae9a5:14525
e.createSession @ @xenova_transformers.js?v=d34ae9a5:14285
loadModel @ @xenova_transformers.js?v=d34ae9a5:14371
await in loadModel (async)
createSessionHandler @ @xenova_transformers.js?v=d34ae9a5:5806
create @ @xenova_transformers.js?v=d34ae9a5:725
await in create (async)
constructSession @ @xenova_transformers.js?v=d34ae9a5:23101
await in constructSession (async)
from_pretrained @ @xenova_transformers.js?v=d34ae9a5:23506
from_pretrained @ @xenova_transformers.js?v=d34ae9a5:26183
await in from_pretrained (async)
loadItems @ @xenova_transformers.js?v=d34ae9a5:30852
pipeline @ @xenova_transformers.js?v=d34ae9a5:30817
(anonymous) @ main2.js:4
Show 16 more frames
Show less
ort-wasm-simd.wasm:0x82c2bc
lt @ @xenova_transformers.js?v=d34ae9a5:2314
P @ @xenova_transformers.js?v=d34ae9a5:2628
$func11504 @ ort-wasm-simd.wasm:0x82c2bc
$func2149 @ ort-wasm-simd.wasm:0x16396e
$func584 @ ort-wasm-simd.wasm:0x48a63
$func11427 @ ort-wasm-simd.wasm:0x829582
$func4164 @ ort-wasm-simd.wasm:0x339b6f
$func4160 @ ort-wasm-simd.wasm:0x339aff
j @ @xenova_transformers.js?v=d34ae9a5:2711
$func356 @ ort-wasm-simd.wasm:0x2e215
j @ @xenova_transformers.js?v=d34ae9a5:2711
$func339 @ ort-wasm-simd.wasm:0x28e06
$Ra @ ort-wasm-simd.wasm:0x6ebffb
e2._OrtCreateSession @ @xenova_transformers.js?v=d34ae9a5:3046
e.createSessionFinalize @ @xenova_transformers.js?v=d34ae9a5:14504
e.createSession @ @xenova_transformers.js?v=d34ae9a5:14525
e.createSession @ @xenova_transformers.js?v=d34ae9a5:14285
loadModel @ @xenova_transformers.js?v=d34ae9a5:14371
await in loadModel (async)
createSessionHandler @ @xenova_transformers.js?v=d34ae9a5:5806
create @ @xenova_transformers.js?v=d34ae9a5:725
await in create (async)
constructSession @ @xenova_transformers.js?v=d34ae9a5:23101
await in constructSession (async)
from_pretrained @ @xenova_transformers.js?v=d34ae9a5:23506
from_pretrained @ @xenova_transformers.js?v=d34ae9a5:26183
await in from_pretrained (async)
loadItems @ @xenova_transformers.js?v=d34ae9a5:30852
pipeline @ @xenova_transformers.js?v=d34ae9a5:30817
(anonymous) @ main2.js:4
Show 16 more frames
Show less
@xenova_transformers.js?v=d34ae9a5:14505 Uncaught Error: Can't create a session
at e.createSessionFinalize (@xenova_transformers.js?v=d34ae9a5:14505:21)
at e.createSession (@xenova_transformers.js?v=d34ae9a5:14525:46)
at e.createSession (@xenova_transformers.js?v=d34ae9a5:14285:17)
at e.OnnxruntimeWebAssemblySessionHandler.loadModel (@xenova_transformers.js?v=d34ae9a5:14371:95)
at async Object.createSessionHandler (@xenova_transformers.js?v=d34ae9a5:5806:20)
at async _InferenceSession.create (@xenova_transformers.js?v=d34ae9a5:725:25)
at async constructSession (@xenova_transformers.js?v=d34ae9a5:23101:12)
at async Promise.all (:5173/index 1)
at async DepthAnythingForDepthEstimation.from_pretrained (@xenova_transformers.js?v=d34ae9a5:23504:14)
at async AutoModelForDepthEstimation.from_pretrained (@xenova_transformers.js?v=d34ae9a5:26183:14)
Sorry, this model requires Transformers.js v3, which you can install with:
npm i @huggingface/transformers
I will update the README accordingly