Is there a PyTorch equivalent of TensorFlow.js?


I’m wondering if there’s an equivalent of TensorFlow.js in PyTorch?

TensorFlow.js works right in the browser and I’d like to do something similar with a PyTorch model (if possible).

Has anyone done this?

Or is using an API for deployment too easy these days?

Running directly in the browser has a fair few benefits.

Thank you

There doesn’t seem overwhelming community demand for it but if you think I’m wrong please let me know!

An alternative may be but the repo is read only so idk if this the best option long term

1 Like

You can do PyTorch → ONNXONNX Runtime Web.

ONNX Runtime Web is under active development.


FYI, ONNX.js has been replaced by ONNX Runtime Web which offers enhanced user experience and improved performance.