MobileModelManager class

Inheritance

Constructors

MobileModelManager.new({required AsyncCallback onDeleteModel, required AsyncCallback onDeleteLora})

Properties

hashCode int
The hash code for this object.
no setterinherited
isLoraInstalled Future<bool>
Whether the lora weights are installed (i.e. downloaded, copied from assets or path to the file is set manually) and ready to use.
no setteroverride
isModelInstalled Future<bool>
Whether the model is installed (i.e. downloaded, copied from assets or path to the file is set manually) and ready to be initialized and used.
no setteroverride
onDeleteLora AsyncCallback
final
onDeleteModel AsyncCallback
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

deleteLoraWeights() Future<void>
Deletes the loaded lora weights. Nothing happens if the lora weights are not loaded.
override
deleteModel() Future<void>
Deletes the loaded model from storage and uninstalls it. If model was installed using the setModelPath method, it will only be uninstalled.
override
downloadLoraWeightsFromNetwork(String loraUrl) Future<void>
Downloads the lora weights from the network and installs it.
override
downloadModelFromNetwork(String url, {String? loraUrl}) Future<void>
Downloads model from URL, uses original file name
override
downloadModelFromNetworkWithProgress(String url, {String? loraUrl}) Stream<int>
Downloads the model and lora weights from the network and installs it with progress.
override
installLoraWeightsFromAsset(String path) Future<void>
Installs the lora weights from the asset.
override
installModelFromAsset(String path, {String? loraPath}) Future<void>
Installs from asset
override
installModelFromAssetWithProgress(String path, {String? loraPath}) Stream<int>
Installs the model and lora weights from the asset with progress.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setLoraWeightsPath(String path) Future<void>
Sets the path to the lora weights file. Use this method to manage the lora weights file manually.
override
setModelPath(String path, {String? loraPath}) Future<void>
Sets direct file paths
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited