π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
enable rust ml in offline mode
laurenspriem08fd8cc0fc3c
diff --git a/mobile/apps/photos/lib/services/machine_learning/ml_indexing_isolate.dart b/mobile/apps/photos/lib/services/machine_learning/ml_indexing_isolate.dartindex c767a881bd..ddbe541006 100644--- a/mobile/apps/photos/lib/services/machine_learning/ml_indexing_isolate.dart+++ b/mobile/apps/photos/lib/services/machine_learning/ml_indexing_isolate.dart@@ -3,7 +3,7 @@ import "dart:io" show Platform;import "package:flutter/foundation.dart" show debugPrint;import "package:logging/logging.dart";-import "package:photos/service_locator.dart" show flagService;+import "package:photos/service_locator.dart" show flagService, isOfflineMode;import 'package:photos/services/machine_learning/face_ml/face_detection/face_detection_service.dart';import 'package:photos/services/machine_learning/face_ml/face_embedding/face_embedding_service.dart';import "package:photos/services/machine_learning/ml_models_overview.dart";@@ -112,7 +112,7 @@ class MLIndexingIsolate extends SuperIsolate {return result;}- bool get _shouldUseRustMl => flagService.useRustForML;+ bool get _shouldUseRustMl => flagService.useRustForML || isOfflineMode;Future<void> prepareRustRuntime() async {if (!_shouldUseRustMl) {diff --git a/mobile/apps/photos/lib/services/machine_learning/ml_service.dart b/mobile/apps/photos/lib/services/machine_learning/ml_service.dartindex 657d1a1e00..1e73bde7f2 100644--- a/mobile/apps/photos/lib/services/machine_learning/ml_service.dart+++ b/mobile/apps/photos/lib/services/machine_learning/ml_service.dart@@ -295,7 +295,7 @@ class MLService {break stream;} else {await MLIndexingIsolate.instance.ensureDownloadedModels();- if (flagService.useRustForML && !rustRuntimePrepared) {+ if ((flagService.useRustForML || isOfflineMode) && !rustRuntimePrepared) {await MLIndexingIsolate.instance.prepareRustRuntime();rustRuntimePrepared = true;}