ComfyUI Node
Compare Image Similarity π
Finds the most similar image to the input image from a folder of images. Returns images at their original resolution unless resize_images is enabled.
Compare Image Similarity π
- input_image
- image
- mask
- FILE_PATH
- FILE_NAME
- SIMILARITY_SCORE
βfolder_pathββΊ
βsimilarity_methodcosineβΊ
βresize_imagesfalseβΊ
βreturn_best_n1βΊ
βuse_cachetrueβΊ
βforce_refresh_cachefalseβΊ
βdebug_modefalseβΊ
Categoryimage
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| input_image | IMAGE | β | |
| folder_path | STRING | Path to folder containing images to search through. | |
| similarity_method | COMBO | cosine | Method to calculate similarity: cosine for angle-based similarity, euclidean for distance-based. |
| resize_images | BOOLEAN | false | If True, resize output images to match input image dimensions. If False, keep original dimensions (recommended). |
| return_best_n | INT | 11β100 | Return the N most similar images. |
| use_cache | BOOLEAN | true | Use cached embeddings for faster processing. Cache is only recalculated if folder contents change. |
| force_refresh_cache | BOOLEAN | false | Force recalculation of embeddings regardless of cache. |
| debug_mode | BOOLEAN | false | Enable detailed debug logging for troubleshooting. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | β |
| mask | MASK | β |
| FILE_PATH | STRING | β |
| FILE_NAME | STRING | β |
| SIMILARITY_SCORE | FLOAT | β |