Another Save Image with Tag
Save images with a text tag baked into the PNG — dataset curation made searchable
- images
Save Image saves a file. AnotherSaveImageWithTag saves a file with a label embedded in the PNG metadata - a custom tag string that travels with the image wherever it goes. It's the difference between a folder full of anonymous 00001.png files and a folder where every image carries its own readable annotation.
Where this pays off: dataset curation. You're generating images for a training set, or collecting variations, and you want each output tagged with something meaningful - the prompt, a category, a seed, a quality flag. The tag lives inside the PNG's metadata under the another_tag key, so it survives renames, folder moves, and being loaded into other tools that read PNG metadata. It's a quiet little bookkeeping win.
How it works
It's a save node with bookkeeping on the side. For each image in the input batch it computes a save path (same filename_counter scheme ComfyUI's own Save Image uses, so files get numbered _00001_ suffixes), writes the PNG, and attaches your tag string as text metadata. The clever part is batch-to-tag mapping: if you pass a list of tags, each image in the batch gets its corresponding tag; if you pass fewer tags than images, the last tag is reused for the rest. So a batch of N images and a list of N tags produces N individually-tagged files.
The tag is stored in a custom metadata field, separate from the workflow prompt data, so it's a label you control rather than a dump of the graph.
Inputs and outputs
images(IMAGE) - the images to save.custom_tag(STRING) - the tag text. Because it's force-input enabled, you can wire it to a text node, which is how you'd generate per-image tags programmatically.filename_prefix(STRING, default "AnotherTag") - the prefix for the saved filenames.
No outputs - it's an output node, the end of the line. The result is files on disk in your ComfyUI output directory.
Installing it
Part of the AnotherUtils pack:
cd ComfyUI/custom_nodes
git clone https://github.com/marcoc2/ComfyUI-AnotherUtils.git
Restart ComfyUI, or install via ComfyUI Manager (search "AnotherUtils"). No extra dependencies - it uses the standard ComfyUI save-path machinery.
Gotchas
The tag is metadata, not a filename - if your workflow depends on scanning filenames for labels, this isn't it, and you'll need to read the PNG metadata to get the tag back out (the pack's own metadata-reading loaders are a natural partner). Also, the metadata only survives as long as the file is a PNG - re-encoding to JPEG strips it.
One subtlety with the batch mapping: if your tag list is longer than your image batch, the extra tags are ignored. And custom_tag is force-input, which means you'll want a text node feeding it rather than trying to type into the widget. For anyone generating labeled training data at scale, this is a genuinely handy little node.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| custom_tag | STRING | — | |
| filename_prefix | STRING | AnotherTag | — |
Outputs (0)
No outputs