保存图像(去除元数据)
The drop-in SaveImage that stops leaking your whole workflow
- images
- 图像
- 文件路径
Every PNG that comes out of ComfyUI's default SaveImage node has your entire workflow hidden inside it - the node graph, the seed, the negative prompt, every LoRA by name and hash. Drag that file back onto the canvas and the whole pipeline rebuilds itself. That's a feature when you share on purpose (ComfyUI's own example workflows ship as PNGs), and a leak when you don't. This node is the fix: a drop-in replacement for SaveImage that writes the pixels and none of the confession.
What it is
CleanMetadataSaveImage - labeled 保存图像(去除元数据) in the node menu, because this pack is Chinese-only - sits in exactly the spot SaveImage does. Feed it the IMAGE from your VAE decode and it writes to ComfyUI/output/ with the same auto-increment naming (CleanedImage_00001_.png), then shows the result right on the node. Right-click → save as gets you the clean file, no digging through folders.
How the cleaning works
The mechanism is the honest part: it never embeds the metadata in the first place. Where SaveImage stuffs the graph into PNG tEXt/iTXt text chunks, this node calls Pillow's save with no pnginfo, so those chunks never exist. No re-encode-and-strip dance, no double compression. PNG output is lossless, and the pixels are the same as any normal save.
Inputs and outputs
Three inputs, and you'll probably touch two. images takes the IMAGE tensor. filename_prefix defaults to CleanedImage. image_format lets you pick png, jpeg, or webp - and here's the thing worth saying plainly: stick with png. PNG is the only one of the three that can carry a ComfyUI graph at all; jpeg and webp re-encode at quality 95 and drop the workflow just by existing, at the cost of your lossless master. If you want a small file for a gallery, convert from the clean PNG afterward - don't let the save node decide for you.
Outputs are 图像 (IMAGE, passed through so you can keep wiring it) and 文件路径 (STRING, the saved location). Since this is an output node, you mostly ignore both.
When to pick a different node
One honest take before the install: this node is for making files dead ends - a picture, not a project. If you actually want your generations auto-linked on CivitAI with their models and LoRAs detected, you want the opposite tool, one of the "Save Image With Metadata" family that writes more, not less. Different jobs, both legitimate.
Install
Install is the standard two-liner:
cd ComfyUI/custom_nodes
git clone https://github.com/Bigesila-B/ComfyUI-MetadataCleaner
Restart ComfyUI after, or install through ComfyUI Manager (search "MetadataCleaner" or paste the Git URL in "Install via Git URL"). No extra Python dependencies - Pillow and numpy are already part of ComfyUI - and no ffmpeg needed, since this is an images-only node.
Checking your work
The one trap is assuming you've cleaned a file when you've just not shared it yet. Verify the way the author does: drag the saved PNG back into ComfyUI. Blank canvas means you're clean. A workflow popping up means you grabbed the wrong file.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| filename_prefix | STRING | CleanedImage | — |
| image_format | COMBO | png | 3 options: png, jpeg, webp |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 图像 | IMAGE | — |
| 文件路径 | STRING | — |