diff --git a/desktop/src/main/services/ml-worker.ts b/desktop/src/main/services/ml-worker.ts index d6e61eeb7d..40c1c5fb5e 100644 --- a/desktop/src/main/services/ml-worker.ts +++ b/desktop/src/main/services/ml-worker.ts @@ -220,7 +220,7 @@ const cachedCLIPImageSession = makeCachedInferenceSession( export const computeCLIPImageEmbedding = async (input: Float32Array) => { const session = await cachedCLIPImageSession(); const feeds = { - input: new ort.Tensor("float32", input, [1, 3, 224, 224]), + input: new ort.Tensor("float32", input, [1, 3, 256, 256]), }; const t = Date.now(); const results = await session.run(feeds); diff --git a/web/packages/new/photos/services/ml/clip.ts b/web/packages/new/photos/services/ml/clip.ts index 78eff1c04d..c61cb5b535 100644 --- a/web/packages/new/photos/services/ml/clip.ts +++ b/web/packages/new/photos/services/ml/clip.ts @@ -120,8 +120,7 @@ const computeEmbedding = async ( * Convert {@link imageData} into the format that the CLIP model expects. */ const convertToCLIPInput = (imageData: ImageData) => { - const requiredWidth = 224; - const requiredHeight = 224; + const [requiredWidth, requiredHeight] = [256, 256]; const mean = [0.48145466, 0.4578275, 0.40821073] as const; const std = [0.26862954, 0.26130258, 0.27577711] as const;