ComfyUI > Nodes > ComfyUI_MieNodes > Dedup Image Files 🐑

ComfyUI Node: Dedup Image Files 🐑

Class Name

DedupImageFiles|Mie

Category
🐑 MieNodes/🐑 Caption Tools
Author
mie (Account age: 1888days)
Extension
ComfyUI_MieNodes
Latest Updated
2025-04-17
Github Stars
0.05K

How to Install ComfyUI_MieNodes

Install this extension via the ComfyUI Manager by searching for ComfyUI_MieNodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_MieNodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Dedup Image Files 🐑 Description

Efficiently manage image directories by removing duplicates using perceptual hashing for AI artists.

Dedup Image Files 🐑| Dedup Image Files 🐑:

The DedupImageFiles| Dedup Image Files 🐑 node is designed to efficiently manage and clean up your image directories by identifying and removing duplicate image files. This node leverages perceptual hashing to compare images, allowing it to detect duplicates even if they have slight variations. By setting a maximum distance threshold, you can control the sensitivity of the duplicate detection process. The primary benefit of using this node is to save storage space and maintain an organized image library by eliminating redundant files. It is particularly useful for AI artists who work with large collections of images and need to ensure that their datasets are free from unnecessary duplicates.

Dedup Image Files 🐑| Dedup Image Files 🐑 Input Parameters:

directory

The directory parameter specifies the path to the folder where the node will search for duplicate image files. It is crucial to provide the correct directory path to ensure that the node can access and process the images you want to deduplicate. There are no specific minimum or maximum values for this parameter, but it should be a valid directory path on your system.

max_distance_threshold

The max_distance_threshold parameter determines the sensitivity of the duplicate detection process. It sets the maximum allowable Hamming distance between image hashes for two images to be considered duplicates. A lower threshold will result in stricter duplicate detection, while a higher threshold may allow for more variations between duplicates. The exact range of values is not specified, but it should be a positive integer, with the default value typically set to a level that balances accuracy and flexibility.

trigger_signal

The trigger_signal parameter is an optional input that can be used to initiate the deduplication process. It is not mandatory for the node's operation, and its presence or absence does not affect the deduplication results. This parameter is useful for integrating the node into automated workflows where specific conditions or events trigger the deduplication process.

Dedup Image Files 🐑| Dedup Image Files 🐑 Output Parameters:

deleted_count

The deleted_count output parameter provides the number of duplicate image files that were successfully deleted from the specified directory. This count helps you understand the extent of deduplication performed and can be used to verify the effectiveness of the node's operation.

log_message

The log_message output parameter contains a detailed log of the deduplication process, including information about the files deleted and any issues encountered. This log is valuable for tracking the node's activity and troubleshooting any problems that may arise during execution.

Dedup Image Files 🐑| Dedup Image Files 🐑 Usage Tips:

  • Ensure that the directory parameter is set to the correct path where your images are stored to avoid accidental deletion of important files.
  • Adjust the max_distance_threshold parameter based on the level of similarity you want to allow between duplicates. A lower threshold is recommended for high precision, while a higher threshold can be used for more lenient deduplication.
  • Use the trigger_signal parameter to automate the deduplication process in larger workflows, ensuring that it runs only when specific conditions are met.

Dedup Image Files 🐑| Dedup Image Files 🐑 Common Errors and Solutions:

Unable to process file <filename>: <error>

  • Explanation: This error occurs when the node encounters an issue while trying to open or process an image file, possibly due to file corruption or unsupported formats.
  • Solution: Verify that the file is not corrupted and is in a supported image format. If the issue persists, consider removing or replacing the problematic file.

Unable to delete file <file>: <error>

  • Explanation: This error indicates that the node was unable to delete a duplicate file, possibly due to file permissions or the file being in use by another process.
  • Solution: Check the file permissions and ensure that no other applications are using the file. You may need to manually delete the file if the issue cannot be resolved programmatically.

File does not exist, may have already been deleted: <file>

  • Explanation: This message suggests that the file intended for deletion was not found, possibly because it was already deleted by another process or manually.
  • Solution: Confirm that the file was not deleted by another process. If it was, no further action is needed. If not, investigate any discrepancies in file handling.

Dedup Image Files 🐑 Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_MieNodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.