runtime_models library
Downloadable ONNX models published by fonnx.
The keys in runtimeModelNamesByPath are paths below
example/assets/models. The values are the plain file names used in the
runtime catalog. Models are runtime downloads; they are not app assets.
Constants
-
prebuiltRuntimeFiles
→ const Map<
String, RuntimeFile> - Runtime files of this package, by file name.
-
runtimeModelNamesByPath
→ const Map<
String, String> - Maps each model's source path to its stable runtime-release file name.
Properties
-
runtimeModelPathsByName
→ Map<
String, String> -
Maps a runtime-release file name back to its model source path.
final
Functions
-
ensureFonnxRuntimeModel(
String modelPath, Directory directory, {Map< String, RuntimeFile> runtimeFiles = prebuiltRuntimeFiles, HttpClient? client, void onProgress(int received, int? total)?}) → Future<File> -
Downloads
modelPathintodirectory, verifies its pinned SHA-256, and returns the local file. -
runtimeModelFile(
String modelPath, [Map< String, RuntimeFile> runtimeFiles = prebuiltRuntimeFiles]) → RuntimeFile -
Finds
modelPathin the published runtime-file catalog. -
runtimeModelName(
String modelPath) → String -
Returns the stable runtime-release file name for
modelPath. -
runtimeModelPath(
String releaseName) → String -
Returns the path below
example/assets/modelsforreleaseName.