Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Make clip use full file

laurenspriem63b55f275927
diff --git a/mobile/lib/services/machine_learning/semantic_search/semantic_search_service.dart b/mobile/lib/services/machine_learning/semantic_search/semantic_search_service.dart
index 44fc961f3f..b7143b70bd 100644
--- a/mobile/lib/services/machine_learning/semantic_search/semantic_search_service.dart
+++ b/mobile/lib/services/machine_learning/semantic_search/semantic_search_service.dart
@@ -25,7 +25,7 @@ import "package:photos/utils/debouncer.dart";
import "package:photos/utils/device_info.dart";
import "package:photos/utils/local_settings.dart";
import "package:photos/utils/ml_util.dart";
-import "package:photos/utils/thumbnail_util.dart";
+// import "package:photos/utils/thumbnail_util.dart";
class SemanticSearchService {
SemanticSearchService._privateConstructor();
@@ -355,12 +355,16 @@ class SemanticSearchService {
await _mlController.future;
}
try {
- final thumbnail = await getThumbnailForUploadedFile(file);
- if (thumbnail == null) {
- _logger.warning("Could not get thumbnail for $file");
- return;
- }
- final filePath = thumbnail.path;
+ // TODO: revert this later
+ // final thumbnail = await getThumbnailForUploadedFile(file);
+ // if (thumbnail == null) {
+ // _logger.warning("Could not get thumbnail for $file");
+ // return;
+ // }
+ // final filePath = thumbnail.path;
+ final filePath =
+ await getImagePathForML(file, typeOfData: FileDataForML.fileData);
+
_logger.info("Running clip over $file");
final result = await _mlFramework.getImageEmbedding(filePath);
if (result.length != kEmbeddingLength) {