Nodes/ComfyUI-Apt_Preset/flow_workflow_save_image_no_metadata
ComfyUI Node

flow_workflow_save_image_no_metadata

SaveImage for people who don't want to hand out their workflow

By cardenluo·Created 2 years ago·Updated about 15 hours ago· 334
flow_workflow_save_image_no_metadata
  • images
  • images
filename_prefixComfyUI

A ComfyUI PNG contains the entire node graph - the workflow and prompt chunks are what lets someone drag your image back onto the canvas and get your setup back. That's a great feature and a quiet privacy problem. Post a render and you've also posted your prompt, your seed, your LoRA names and every path in your graph. Most people's fix is to convert the file to JPEG before uploading, which works and also degrades the image.

flow_workflow_save_image_no_metadata is the boring, correct fix: it is core SaveImage, with the metadata arguments passed through as None. Same pixels, same directory behaviour, same filename templating - minus everything that describes how the picture was made.

What it is, precisely

In the pack's source it's literally a subclass of ComfyUI's SaveImage that overrides one method and calls the parent with prompt=None, extra_pnginfo=None. If you've ever wondered what the difference between that and --disable-metadata is: the launch flag disables metadata ComfyUI-wide, this node disables it for one save point. The two compose fine, and the node is the one that lets you keep the workflow attached on your archive branch while shipping clean files from the share branch.

The widgets are identical to SaveImage, which is the point - it's a drop-in you can swap into an existing graph without rewiring anything:

  • images - the IMAGE batch to save. Also passed through as the node's images output, so you can chain it.
  • filename_prefix - same templating as core, including %date:yyyy-MM-dd% and node-reference tokens like %Empty Latent Image.width%, so dated folders and resolution-tagged filenames still work.

It's an output node, which means it runs when you queue, and images land in ComfyUI/output.

When you actually want it

Three cases. Sharing: Civitai, Reddit, Discord, anywhere the file leaves your machine. Anything with a client: they get the render, not the recipe - and a workflow chunk full of your local paths is a small info leak you don't need. Batch work where the metadata is actively harmful: some pipelines and uploaders choke on oversized text chunks, and a stripped PNG is a few hundred KB smaller.

There's a real cost to weigh. Metadata is your recovery mechanism - a PNG saved without it is unrecoverable, and re-encoding by any host (Civitai, Reddit's image pipeline, a JPEG conversion, a screenshot) destroys it anyway. So the professional pattern is: keep an archive set with metadata, save a share set without, and never treat the posted file as your backup. This node exists to make that second set one wire away.

One caveat on CivitAI specifically: its A1111-style parameters auto-linking reads a different text chunk that A1111 and Forge write. That chunk isn't what this node is removing, and ComfyUI's own graph chunks aren't what Civitai parses for hashes anyway - so if your reason for stripping is "auto-generated model links", check what you're actually relying on before you assume the node changed it.

Install

Same as the rest of the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset
cd ComfyUI-Apt_Preset
pip install -r requirements.txt

Then restart ComfyUI. The node is categorised as plain image rather than under the pack's Apt_Preset/* tree, which makes it slightly annoying to find in a crowded node menu - search "no_metadata" instead of browsing.

Gotchas

It only strips what it saves. A preview node, a video saver, or another pack's image writer in the same workflow will happily write whatever it wants, so if you use this node alongside a second saver, verify the actual output file rather than assuming the branch is clean. And you still have flow_workflow_save_gate if you'd rather the program decided for you: switch the gate off and this node gets swapped in automatically for every core SaveImage downstream of it - meaning you rarely need to place it by hand at all.

Categoryimage

Inputs (2)

NameTypeDefaultDescription
imagesIMAGEThe images to save.
filename_prefixSTRINGComfyUIThe prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes.

Outputs (1)

NameTypeDescription
imagesIMAGE