mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 07:28:26 +00:00
[mob] Select load models
This commit is contained in:
parent
08f846c315
commit
0bd04a0b8d
@ -516,7 +516,7 @@ class MLService {
|
||||
return actuallyRanML;
|
||||
}
|
||||
|
||||
Future<void> _initModels() async {
|
||||
Future<void> _initModelsUsingFfiBasedPlugin() async {
|
||||
return _initModelLock.synchronized(() async {
|
||||
if (_isModelsInitialized) return;
|
||||
_logger.info('initModels called');
|
||||
@ -623,8 +623,11 @@ class MLService {
|
||||
|
||||
Future<void> _ensureReadyForInference() async {
|
||||
await _initIsolate();
|
||||
await _initModels();
|
||||
await _initModelUsingEntePlugin();
|
||||
if (Platform.isAndroid) {
|
||||
await _initModelUsingEntePlugin();
|
||||
} else {
|
||||
await _initModelsUsingFfiBasedPlugin();
|
||||
}
|
||||
}
|
||||
|
||||
/// The main execution function of the isolate.
|
||||
|
Loading…
x
Reference in New Issue
Block a user