Ino Remove Duplicate Files
Dedupe a folder by content hash
- success
- message
- rel_path
- abs_path
- removed_list
- removed_count
Every long-running batch job eventually leaves a folder that looks like this: render_final.png, render_final(1).png, render_final(2).png, all byte-for-byte identical, eating disk and confusing every downstream step. InoRemoveDuplicateFiles finds and removes those copies by content hash, not filename - so it catches the real duplicates and leaves near-identical-but-different files alone. It's the cleanup node you run before you upload a results folder to S3 or archive a dataset, and it's one of the few destructive nodes in the pack, so treat it with the respect that implies.
The mechanism is the thing to trust: it hashes files and compares SHA-256 digests, with a chunk_size control for how it reads files. That's the same content-addressing trick git and every dedup tool use - it's immune to the filename games ("copy", "(1)", renames) that would fool a size check.
How it works
Required inputs: enabled, parent_folder (input/output/temp), folder (the target subfolder), and recursive (default True - includes subfolders). Optional: chunk_size (default 32 KB, range 8–1024) - how big a chunk the hasher reads at a time; larger is faster on big files, smaller uses less RAM.
Outputs: success, message, rel_path / abs_path, then the report: removed_list (a string listing what got deleted) and removed_count (INT).
It's a terminal node (is_output_node), so it's meant to sit at the end of a chain - run it after your batch finishes writing. If enabled is off, it returns success: False and does nothing, which is the safe default posture for anything destructive.
Installing it
Part of the 125+-node ComfyUI-InoNodes pack by nobandegani:
cd ComfyUI/custom_nodes
git clone https://github.com/nobandegani/comfyui_ino_nodes
cd comfyui_ino_nodes
pip install -r requirements.txt
Or search "ComfyUI Ino Nodes" in ComfyUI Manager, install, restart. V3 schema - current ComfyUI required.
Common issues
The obvious one: this node deletes files, and deletion is permanent. There's no trash in the folder system - removed files are gone. Point it at output with a specific subfolder, not at input where your source material lives, and double-check recursive before running it on a tree you care about. The removed_list output is your paper trail; read it after the first run on a scratch copy to confirm the dedup behaves the way you expect (identical hashes only). Also note removed_count counts files it actually deleted, not duplicates it detected - if that number is 0, either the folder was clean or the hash comparison found nothing identical, which is the good outcome.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | BOOLEAN | true | — |
| parent_folder | COMBO | 3 options: input, output, temp | |
| folder | STRING | — | |
| recursive | BOOLEAN | true | — |
| chunk_sizeopt | INT | 328–1024 | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| success | BOOLEAN | — |
| message | STRING | — |
| rel_path | STRING | — |
| abs_path | STRING | — |
| removed_list | STRING | — |
| removed_count | INT | — |