清除文件元数据
Clean metadata from files you've already saved
- 文件路径
The other two nodes in this pack clean on the way out. This one is for files that already exist. Somewhere in your output folder is a PNG or MP4 you saved with the default node before you knew it was carrying the full workflow graph, your seed, and the exact LoRAs - or you just picked up someone else's file. CleanMetadataFile (清除文件元数据 in the node menu) scrubs it after the fact, and it's the most broadly useful of the three.
The single input
The input is a single STRING: file_path. Give it a full path (D:\out\video.mp4, /home/you/output/x.png), or just a filename - if it isn't absolute, the node searches ComfyUI's output and temp folders recursively for you. That last bit is the sleeper feature. Video pipelines drop intermediate files into temp, and being able to type a bare filename instead of hunting down a path saves real time.
What it cleans and how
The mechanism splits by file type, and this is where the pack is careful:
- PNG gets byte-level surgery that drops the
tEXt/zTXt/iTXt/eXIf/tIMEchunks - exactly the chunks where ComfyUI hides its prompt and workflow. The image data passes through untouched, so your pixels are bit-identical. No re-encode. - JPEG gets the same treatment, stripping EXIF / XMP / comment segments without recompressing.
- Everything else - MP4, WebM, MKV, MOV, GIF, WebP - goes through ffmpeg as a stream copy (
-c copy, metadata mapped away). No re-encode there either.
What comes out
Nothing you point it at gets modified in place. The cleaned file is written to output/cleaned/ with a _cleaned suffix appended - MyImage.png becomes MyImage_cleaned.png - and the original stays exactly where it was. The output (文件路径, a STRING) is the full path of the clean file, and the node previews the result right on the canvas: images via the normal preview, videos through a player, so right-click → save as gets you the clean artifact rather than the dirty original.
The one friction point
The one real friction: there's no file picker. You type the path into the box, and if you fumble it you get a not-found error. Since it searches output and temp by basename, a plain filename usually works, but a typo in the extension means "not found." Small price for a node that otherwise needs zero configuration.
Install and dependencies
Requirements mirror the rest of the pack: no Python dependencies for images, ffmpeg for anything that isn't a PNG or JPEG, found via the same chain as the video node (PATH → ffmpeg.exe in the ComfyUI root → imageio_ffmpeg). Install is the usual:
cd ComfyUI/custom_nodes
git clone https://github.com/Bigesila-B/ComfyUI-MetadataCleaner
then restart, or use ComfyUI Manager.
Verifying your work
Verification is the same trick as everywhere in this pack: drag the _cleaned PNG back into ComfyUI and expect a blank canvas. If a workflow still pops up, you dragged the original. And if you can't find the clean file - it's in output/cleaned/, named with the suffix. Which of the three to reach for? Still in the graph, use the save variants. File already on disk, this is the one.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| file_path | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 文件路径 | STRING | — |