🧹 Metadata Cleaner
Strip the recipe out of your PNG before you post it
- images
- source_image
- images
- info
Every PNG ComfyUI saves carries your entire workflow in its text chunks. That's the magic behind "workflow included" - drag the image back in and the whole graph rebuilds. It's also a leak: post an image and anyone who can drag it into ComfyUI gets your exact sampler settings, seed, and prompt for free. 🧹 Metadata Cleaner re-saves images with the metadata gone, or with only the metadata you explicitly choose. If you've ever uploaded a generation and thought "I don't actually want to hand out the recipe," this is the node.
How it works
You feed it an IMAGE tensor - straight from a VAE Decode, or from a Load Image output. It converts each frame to a PIL image and writes a fresh PNG into your output folder. The interesting part is what it writes into that PNG:
cleanmode writes nothing. Noprompt, noworkflow, noparameterschunks - a genuinely bare PNG.custommode writes only yourcustom_metadatastring as aparameterschunk, the A1111-style key, so other tools that read that key will find your text.clonemode is listed, and here's the honest part: in the current code it saves the same stripped PNG asclean. Thesource_imageinput exists for the day "clone" learns to copy chunks from a reference file - don't rely on it yet.
The inputs that matter
images is the batch you're cleaning. mode is clean/custom/clone as above. filename_prefix defaults to cleaned_ and, usefully, accepts a subfolder: set Cleaner/IMG and it creates that folder under your output directory. save is the escape hatch - flip it off and the node just passes the images through without writing anything, handy when you want to keep metadata but leave the node in the graph. When you do save, the info output tells you how many files were written, and images passes your batch through untouched so the node can sit inline.
One detail that trips people up: filenames come out as cleaned_0000_0001.png - a per-batch index plus a collision counter. You'll never overwrite an existing file, but don't expect pretty names either.
Why you'd bother
The honest use case is not leaking your workflow, and a close second is handing someone a clean copy of a batch. It's also the pack's only image-saving node that doesn't assume you want a workflow embedded in the output - which, given how much of the community reflexively strips metadata before posting, is a real gap being filled.
Installing
Part of the ComfyUI-Prompting-System pack, so one install gets you this plus the pack's three other nodes and its "PS" sidebar tab. In ComfyUI Manager, search "ComfyUI-Prompting-System". Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/danieljanata/ComfyUI-Prompting-System
Restart ComfyUI and you're done. There's no requirements.txt and nothing to download - the pack leans on Pillow and numpy, which ComfyUI already ships. One caveat to keep in mind: this is a brand-new, one-person pack with no README in the repo, so verify behavior against the code if a future update changes modes. Today, clean and custom do what they say.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| mode | COMBO | clean | 3 options: clean, custom, clone |
| filename_prefix | STRING | cleaned_ | — |
| save | BOOLEAN | true | — |
| source_imageopt | IMAGE | — | |
| custom_metadataopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| info | STRING | — |