modelport_executorch library

PyTorch ExecuTorch adapter for ModelPort.

await ModelPortFlutter.init(adapters: [ExecuTorchAdapter()]);
final classifier = await ImageClassifier.load('hf://org/mobilenet_v3_small');

Classes

ExecuTorchAdapter
Runs executorch variants (.pte programs) through executorch_flutter.
ExecuTorchSession
A .pte program loaded with ExecuTorch.

Functions

tensorTypeOf(DType dtype) → TensorType
The ExecuTorch element type for a manifest dtype.
toTensor(DType expected, TensorData output) → Tensor
Wraps an ExecuTorch output as a Tensor, checking it has the manifest dtype.