Skip to content

ONNX Backend Env variable #1458

@Heinrik-20

Description

@Heinrik-20

Question

Hi,

For some context, I'm building an application that uses some of the models on huggingface as an annotation tool that helps create annotations for training a specialised model.

As for the specialised model, I am able to export them to onnx, and I was able to run this model in the same application, but I have to manually install the same onnxruntime-web version to be able to do so. I looked into the docs here, but I cannot access these functions through env.backends.onnx. I've tried console.log(env.backends.onnx.isONNXProxy()) and got

Uncaught (in promise) TypeError: env.backends.onnx.isONNXProxy is not a function

Is there a way I can access the same inference session through this package?


My package.json

{
    "dependencies": {
        "@huggingface/transformers": "3.7.5",
        "onnxruntime-web": "1.22.0-dev.20250409-89f8206ba4"
    },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions