Load Image Dedup
The Load Image that won't bury you in 'image (1).jpg' copies
- IMAGE
- MASK
Let's start with the honest bit, because the pack's own README does too: this node's reason for existing mostly got absorbed by core ComfyUI. A patch to the default Load Image node landed around August 2024 with similar dedup behavior. On a current ComfyUI, dropping the same image in twice usually won't spawn a duplicate file anymore. So the first question to ask is whether you need this at all.
Where it still earns its keep: the overwrite_option control, which stock Load Image doesn't give you. And if you're running an older ComfyUI that predates the dedup patch, this is exactly the behavior you're missing.
What it does
In every other respect, Load Image Dedup is the stock Load Image: the same dropdown of files in your input folder, the same upload button, the same drag-and-drop, the same IMAGE and MASK outputs wired identically. The difference is only what happens when you upload a file. Where stock Load Image happily writes my image.jpg, then my image (1).jpg, then my image (2).jpg as you keep re-dropping the same file, this node checks before writing. It looks for files with the same name - including ComfyUI's auto-generated (1), (2) variants - and compares their contents by hash against the new upload. Same file already there? Nothing gets written, and the node just points at the existing copy. No clutter, no my image (1).jpg graveyard filling up your input list.
The one input that matters
image is the usual input-folder dropdown, and alongside it there's overwrite_option, defaulting to no_overwrite:
- no_overwrite - the safe default. Old input images are never touched; true dedup.
- input_filename - the new upload overwrites the old file if the names match. Handy when you're iterating and genuinely want to replace the source.
- last_rename - replaces the highest-numbered renamed copy. If your input folder has
my image.jpg,my image (1).jpgandmy image (2).jpg, a freshmy image.jpgclobbersmy image (2).jpg, keeping the original and the first rename.
The dedup check is exact-content hashing, not just filename matching - a same-named file with different pixels is treated as a new image and written as a rename, not skipped.
Installing it
Same pack as its two siblings - kappa54m/ComfyUI_Usability. ComfyUI Manager, search "ComfyUI Usability", or:
cd ComfyUI/custom_nodes
git clone https://github.com/kappa54m/ComfyUI_Usability
cd ComfyUI_Usability
pip install -r requirements.txt
Restart ComfyUI and it shows up in the image category. The pack's only dependency is watchdog, which this node doesn't even use - that's for the by-path siblings - but Manager installs it anyway. No models, nothing heavy.
Gotchas
- Dedup only applies through this node's own upload path. Drag the same file into a stock Load Image and you're back to duplicate city. Use this node consistently, or the clutter reappears.
- The hash check runs on upload through this node's button or drag-and-drop. Files already sitting in the input folder when you first add the node aren't retroactively cleaned.
- If you pick
input_filenameorlast_rename, you're deliberately destroying an old copy, and ComfyUI's input folder has no undo. Make sure you meant it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 1 options: example.png | |
| overwrite_optionopt | COMBO | 3 options: no_overwrite, input_filename, last_rename |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |