π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Prepare for merge to main
Manav Rathibe61cd08b864
diff --git a/web/apps/photos/src/services/searchService.ts b/web/apps/photos/src/services/searchService.tsindex 2a92fa2171..5514233ce4 100644--- a/web/apps/photos/src/services/searchService.ts+++ b/web/apps/photos/src/services/searchService.ts@@ -1,10 +1,8 @@import { FILE_TYPE } from "@/media/file-type";import { faceIndexingStatus, isMLEnabled } from "@/new/photos/services/ml";-import { clipMatches } from "@/new/photos/services/ml/clip";import type { Person } from "@/new/photos/services/ml/people";import { EnteFile } from "@/new/photos/types/file";import { isDesktop } from "@/next/app";-import { ensureElectron } from "@/next/electron";import log from "@/next/log";import * as chrono from "chrono-node";import { t } from "i18next";@@ -371,13 +369,14 @@ async function searchLocationTag(searchPhrase: string): Promise<LocationTag[]> {}const searchClip = async (- searchPhrase: string,+ // eslint-disable-next-line @typescript-eslint/no-unused-vars+ _searchPhrase: string,): Promise<ClipSearchScores | undefined> => {- // TODO-ML:- //return undefined;- const matches = await clipMatches(searchPhrase, ensureElectron());- log.debug(() => ({ t: "clip-scores", matches }));- return matches;+ // TODO-ML: clip-test+ return undefined;+ // const matches = await clipMatches(searchPhrase, ensureElectron());+ // log.debug(() => ({ t: "clip-scores", matches }));+ // return matches;};function convertSuggestionToSearchQuery(option: Suggestion): Search {diff --git a/web/packages/new/photos/services/ml/db.ts b/web/packages/new/photos/services/ml/db.tsindex 6a0fee1b6a..9e4f9cf90b 100644--- a/web/packages/new/photos/services/ml/db.ts+++ b/web/packages/new/photos/services/ml/db.ts@@ -224,7 +224,7 @@ export const saveFaceIndex = async (faceIndex: FaceIndex) => {const newFileStatus = (fileID: number): FileStatus => ({fileID,status: "indexable",- // TODO-ML:+ // TODO-ML: clip-test// pending: ["file-ml-clip-face", "onnx-clip"],pending: ["file-ml-clip-face"],failureCount: 0,diff --git a/web/packages/new/photos/services/ml/worker.ts b/web/packages/new/photos/services/ml/worker.tsindex 17e45a4236..009d4b9106 100644--- a/web/packages/new/photos/services/ml/worker.ts+++ b/web/packages/new/photos/services/ml/worker.ts@@ -20,12 +20,7 @@ import {saveFaceIndex,updateAssumingLocalFiles,} from "./db";-import {- pullCLIPEmbeddings,- pullFaceEmbeddings,- putCLIPIndex,- putFaceIndex,-} from "./embedding";+import { pullFaceEmbeddings, putCLIPIndex, putFaceIndex } from "./embedding";import { indexFaces, type FaceIndex } from "./face";import type { MLWorkerElectron } from "./worker-electron";@@ -249,7 +244,7 @@ const pull = async () => {const res = await Promise.allSettled([pullFaceEmbeddings(),// TODO-ML: clip-test- pullCLIPEmbeddings(),+ // pullCLIPEmbeddings(),]);for (const r of res) {switch (r.status) {@@ -366,7 +361,7 @@ const index = async (const res = await Promise.allSettled([_indexFace(f, enteFile, image, electron, userAgent),// TODO-ML: clip-test- _indexCLIP(f, enteFile, image, electron, userAgent),+ // _indexCLIP(f, enteFile, image, electron, userAgent),]);image.bitmap.close();@@ -441,7 +436,8 @@ const _indexFace = async (return `${faceIndex.faceEmbedding.faces.length} faces`;};-const _indexCLIP = async (+// TODO-ML: clip-test export+export const _indexCLIP = async (f: string,enteFile: EnteFile,image: ImageBitmapAndData,