Skip to content

armgit / ente

Public Imported from GitHub
0

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

Don't initialize face DB in non-desktop builds

Manav Rathia73e7af70498
diff --git a/web/packages/gallery/components/FileInfo.tsx b/web/packages/gallery/components/FileInfo.tsx
index ec49c17b17..40d8d3e44d 100644
--- a/web/packages/gallery/components/FileInfo.tsx
+++ b/web/packages/gallery/components/FileInfo.tsx
@@ -200,6 +200,7 @@ export const FileInfo: React.FC<FileInfoProps> = ({
useEffect(() => {
if (!file) return;
+ if (!isMLEnabled()) return;
let didCancel = false;
@@ -317,7 +318,7 @@ export const FileInfo: React.FC<FileInfoProps> = ({
)
}
/>
- {isMLEnabled() && annotatedFaces.length > 0 && (
+ {annotatedFaces.length > 0 && (
<InfoItem icon={<FaceRetouchingNaturalIcon />}>
<FilePeopleList
file={file}
diff --git a/web/packages/new/photos/services/ml/index.ts b/web/packages/new/photos/services/ml/index.ts
index 89a08dc041..0b79922ceb 100644
--- a/web/packages/new/photos/services/ml/index.ts
+++ b/web/packages/new/photos/services/ml/index.ts
@@ -654,6 +654,8 @@ export interface AnnotatedFaceID {
export const getAnnotatedFacesForFile = async (
file: EnteFile,
): Promise<AnnotatedFaceID[]> => {
+ if (!isMLEnabled()) return [];
+
const index = await savedFaceIndex(file.id);
if (!index) return [];