Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Move

laurenspriem61c1847d75d9
diff --git a/mobile/lib/services/machine_learning/ml_indexing_isolate.dart b/mobile/lib/services/machine_learning/ml_indexing_isolate.dart
index b01037dc83..fec1cbf410 100644
--- a/mobile/lib/services/machine_learning/ml_indexing_isolate.dart
+++ b/mobile/lib/services/machine_learning/ml_indexing_isolate.dart
@@ -189,9 +189,8 @@ class MLIndexingIsolate {
/// Analyzes the given image data by running the full pipeline for faces, using [_analyzeImageSync] in the isolate.
Future<MLResult?> analyzeImage(
FileMLInstruction instruction,
+ String filePath,
) async {
- final String filePath = await getImagePathForML(instruction.file);
-
final Stopwatch stopwatch = Stopwatch()..start();
late MLResult result;
diff --git a/mobile/lib/services/machine_learning/ml_service.dart b/mobile/lib/services/machine_learning/ml_service.dart
index e3e41c73d2..b048301ad1 100644
--- a/mobile/lib/services/machine_learning/ml_service.dart
+++ b/mobile/lib/services/machine_learning/ml_service.dart
@@ -391,8 +391,11 @@ class MLService {
bool actuallyRanML = false;
try {
+ final String filePath = await getImagePathForML(instruction.file);
+
final MLResult? result = await MLIndexingIsolate.instance.analyzeImage(
instruction,
+ filePath,
);
// Check if there's no result simply because MLController paused indexing
if (result == null) {