Nodes/ComfyUI_Mira/Image Saver
ComfyUI Node

Image Saver

Save with full A1111-style metadata baked in

By mirabarukaso·Created 2 years ago·Updated 5 days ago· 206
Image Saver
  • images
  • hashes
filename%time_%basemodelname_%seed
path
extension
steps20
cfg7.00
modelname
sampler_name
schedulernormal
positiveunknown
negativeunknown
seed_value0
width512
height512
lossless_webptrue
quality_jpeg_or_webp100
optimize_pngfalse
counter0
denoise1.00
clip_skip0
time_format%Y-%m-%d-%H%M%S
save_workflow_as_jsonfalse
embed_workflowtrue
additional_hashes

ComfyUI's stock Save Image node writes the workflow into the PNG and calls it a day. That's useless if you want the generation parameters - model, sampler, steps, CFG, seed, prompt - readable as the kind of metadata Civitai and A1111-style tools parse. This node fills that gap: it saves your image with a proper parameters string embedded, so the file carries its own recipe.

It's forked from alexopus's ComfyUI-Image-Saver, with the Civitai-download bits stripped out. The author is candid about why it exists - it's a stable node for their own standalone-app API, frozen so an upstream update can't change its behavior. Their own advice, which is worth repeating: for general use, alexopus's original is the fuller-featured choice. This fork is here for people who want the metadata-saving behavior without the Civitai coupling. The strong click-through on it suggests plenty of people are searching for exactly that.

How it works

You wire your finished images in, and you also feed it the generation settings - steps, CFG, sampler, seed, the prompts, dimensions - as inputs. It assembles those into an A1111-style parameters string and writes it into the saved file's metadata (and optionally embeds the full ComfyUI workflow too). The filename is templated, so you can encode the model name, seed, and timestamp right into the filename automatically. The one output, hashes, is a string of the model/resource hashes it computed - the same hashes Civitai uses to recognize which checkpoint and LoRAs made an image.

The inputs that matter

Most of the many inputs are just the metadata fields you pass through from your sampler. The few that shape behavior:

  • images - what you're saving.
  • filename - a template, default %time_%basemodelname_%seed. Those % tokens get filled in, so you get self-describing filenames without renaming by hand.
  • path - subfolder under your output directory. Leave blank for the default.
  • extension - png, jpeg, jpg, or webp. PNG for lossless with embedded workflow; webp/jpeg when you care about file size (with quality_jpeg_or_webp and lossless_webp to tune that).
  • embed_workflow - on by default; keeps the draggable ComfyUI workflow inside the file.

The metadata inputs (steps, cfg, sampler_name, scheduler, positive, negative, seed_value, width, height, modelname, clip_skip, …) are what actually populate the parameters string. They're optional, but the saver is only as complete as what you feed it - connect them from your sampler and loader for a full record.

Install

ComfyUI Manager → search ComfyUI_Mira → Install → restart, or cd ComfyUI/custom_nodes && git clone https://github.com/mirabarukaso/ComfyUI_Mira.git and restart. If it errors on load, pip install -r requirements.txt in the pack folder. No model download needed.

Common issues

The usual disappointment is "the metadata is half empty" - that's because the fields are optional inputs and you didn't wire them. The node can't read your sampler's mind; if you want steps and CFG in the saved parameters, connect steps, cfg, sampler_name and the rest from the nodes that hold those values. If the embedded hashes come back blank or wrong, check modelname and additional_hashes - the hash lookup keys off the model name you pass. And if you specifically need the Civitai auto-download or the richer feature set, use alexopus's upstream node instead; the author put that recommendation in the readme for a reason.

CategoryMira/Util/Image

Inputs (24)

NameTypeDefaultDescription
imagesIMAGEimage(s) to save
filenameSTRING%time_%basemodelname_%seedfilename (available variables: %date, %time, %model, %width, %height, %seed, %counter, %sampler_name, %steps, %cfg, %scheduler, %basemodelname, %denoise, %clip_skip)
pathSTRINGpath to save the images (under Comfy's save directory)
extensionCOMBOfile extension/type to save image as
stepsoptINT201–10000number of steps
cfgoptFLOAT7.000–100CFG value
modelnameoptSTRINGmodel name
sampler_nameoptSTRINGsampler name (as string)
scheduleroptSTRINGnormalscheduler name (as string)
positiveoptSTRINGunknownpositive prompt
negativeoptSTRINGunknownnegative prompt
seed_valueoptINT00–18446744073709550000seed
widthoptINT5120–16384image width
heightoptINT5120–16384image height
lossless_webpoptBOOLEANtrueif True, saved WEBP files will be lossless
quality_jpeg_or_webpoptINT1001–100quality setting of JPEG/WEBP
optimize_pngoptBOOLEANfalseif True, saved PNG files will be optimized (can reduce file size but is slower)
counteroptINT00–18446744073709550000counter
denoiseoptFLOAT1.000–1denoise value
clip_skipoptINT0-24–24skip last CLIP layers (positive or negative value, 0 for no skip)
time_formatoptSTRING%Y-%m-%d-%H%M%Stimestamp format
save_workflow_as_jsonoptBOOLEANfalseif True, also saves the workflow as a separate JSON file
embed_workflowoptBOOLEANtrueif True, embeds the workflow in the saved image files. Stable for PNG, experimental for WEBP. JPEG experimental and only if metadata size is below 65535 bytes
additional_hashesoptSTRINGhashes separated by commas, optionally with names. 'Name:HASH' (e.g., 'MyLoRA:FF735FF83F98')

Outputs (1)

NameTypeDescription
hashesSTRINGComma-separated list of the hashes to chain with other Image Saver additional_hashes