diff --git a/src/utils/image-tools.ts b/src/utils/image-tools.ts index c0f5e77..b15b76c 100644 --- a/src/utils/image-tools.ts +++ b/src/utils/image-tools.ts @@ -134,6 +134,10 @@ export const dedupImagesWithEmbeddings = ( similarityThreshold: number = 0.86, // Default similarity threshold ): ImageObject[] => { try { + if (newImages.length === 0) { + logWarning('No new images provided for deduplication'); + return []; + } // Quick return for single new image with no existing images if (newImages.length === 1 && existingImages.length === 0) { return newImages;