Skip to content

armgit / ente

Public Imported from GitHub
0

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

lf

Manav Rathibe06e5ae2538
diff --git a/web/packages/new/photos/services/ml/clip.ts b/web/packages/new/photos/services/ml/clip.ts
index 9337e68ffd..eecf7e2209 100644
--- a/web/packages/new/photos/services/ml/clip.ts
+++ b/web/packages/new/photos/services/ml/clip.ts
@@ -1,5 +1,5 @@
import type { Electron } from "@/base/types/ipc";
-import type { IndexableImage } from "./blob";
+import type { ImageBitmapAndData } from "./blob";
import { clipIndexes } from "./db";
import { pixelRGBBicubic } from "./image";
import { dotProduct, norm } from "./math";
@@ -102,7 +102,7 @@ export type LocalCLIPIndex = CLIPIndex & {
* our Node.js layer to run the ONNX inference.
*/
export const indexCLIP = async (
- image: IndexableImage,
+ image: ImageBitmapAndData,
electron: MLWorkerElectron,
): Promise<CLIPIndex> => ({
embedding: await computeEmbedding(image.data, electron),
diff --git a/web/packages/new/photos/services/ml/face.ts b/web/packages/new/photos/services/ml/face.ts
index af018ad654..910970d3b9 100644
--- a/web/packages/new/photos/services/ml/face.ts
+++ b/web/packages/new/photos/services/ml/face.ts
@@ -17,7 +17,7 @@ import {
translate,
type Matrix as TransformationMatrix,
} from "transformation-matrix";
-import type { IndexableImage } from "./blob";
+import type { ImageBitmapAndData } from "./blob";
import {
grayscaleIntMatrixFromNormalized2List,
pixelRGBBilinear,
@@ -241,7 +241,7 @@ export interface Box {
*/
export const indexFaces = async (
enteFile: EnteFile,
- { data: imageData }: IndexableImage,
+ { data: imageData }: ImageBitmapAndData,
electron: MLWorkerElectron,
): Promise<FaceIndex> => ({
width: imageData.width,