ComfyUI Node

Save Images

The filename-obsessive's file saver

By r-vage·Created about a year ago·Updated 5 months ago· 23
Save Images
  • images
  • pipe_opt
  • images
  • files
output_path%today/%basemodel
filename_prefix%today, %time, %basemodel, %seed, %sampler_name, %scheduler, %steps, %cfg, %denoise
filename_delimiter_
filename_number_padding4
filename_number_startfalse
extension
dpi300
quality100
optimize_imagefalse
lossless_webptrue
embed_workflowtrue
save_generation_datafalse
remove_promptsfalse
save_workflow_as_jsonfalse
add_loras_to_promptfalse
show_previewsfalse

ComfyUI's built-in Save Image works fine, but it doesn't care about your filing system. Save Images is the node that does: it names files from a template of placeholders, routes them into dated, model-named folders, and can embed workflow plus Civitai-style generation metadata so your output is as organized as your prompts are long. If you save a lot of generations and ever squint at a folder of ComfyUI_00042_.png files wondering which is which, this is aimed at you.

How it works

You feed it images, and it writes them out to ComfyUI's output folder using a filename template. The template supports placeholders the node resolves at save time - %today, %time, %basemodel, %seed, %sampler_name, %scheduler, %steps, %cfg, %denoise (plus %model and %clip_skip). The defaults are already sensible:

  • output_path defaults to %today/%basemodel - so files land in output/<date>/<model-name>/.
  • filename_prefix defaults to a template like %today, %time, %basemodel, %seed, %sampler_name, %scheduler, %steps, %cfg, %denoise.

You also get the usual knobs: filename_delimiter (default _), filename_number_padding (default 4), a toggle for starting numbering, extension (png/jpg/jpeg/gif/tiff/webp/bmp), dpi, quality, optimize_image, lossless_webp, embed_workflow, and save_workflow_as_json. In short: everything a power user wants and the core node doesn't offer.

The input that makes the metadata work

There's one optional input worth understanding: pipe_opt. It accepts an RvTools pipe, and if you wire one in, the node pulls real generation data - model, seed, sampler, scheduler, steps, cfg, denoise, LoRA names - out of it instead of guessing. That's what makes %basemodel and %seed in your filenames actually resolve to something. The save_generation_data toggle then writes an A1111-style parameters block (with model/embedding/LoRA hashes computed the Civitai way) into the image metadata, and add_loras_to_prompt folds LoRA references into the saved prompt. If you ever upload to Civitai, this is the workflow: the site can read that metadata and rebuild your generation settings.

Outputs: images (passthrough, so you can keep processing after saving) and files, a list of the paths you just wrote - handy if you want to feed filenames into another node.

The inputs that matter

  • images - what you're saving.
  • output_path / filename_prefix - the templates; this is where the node's personality lives.
  • pipe_opt - wire a pipe in if you want accurate generation metadata in names and EXIF.

Installing it

Part of the RvTools v2 pack - no model files. ComfyUI Manager → search RvTools → install ComfyUI-RvTools_v2, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI-RvTools_v2

Restart and confirm RvTools v2: Version 2.5.x in the console. Note the pack's requirements include piexif (EXIF writing) and Pillow (already in ComfyUI) - Manager handles these.

Troubleshooting

  • Placeholders come out empty. If %basemodel or %seed renders blank, the node couldn't get generation data - connect pipe_opt (or ensure the upstream is an RvTools pipe carrying that info). No pipe, no metadata.
  • WebP isn't lossy by accident. lossless_webp defaults to true; if you want smaller webp files, turn it off.
  • Old v1 RvTools workflows fail to install because the original repo was deleted; v2 renamed all nodes. And the author has since moved on to ComfyUI_Eclipse, the successor pack.
Category🫦 RvTools II/ Image

Inputs (18)

NameTypeDefaultDescription
imagesIMAGE
output_pathSTRING%today/%basemodel
filename_prefixSTRING%today, %time, %basemodel, %seed, %sampler_name, %scheduler, %steps, %cfg, %denoise
filename_delimiterSTRING_
filename_number_paddingINT41–9
filename_number_startBOOLEANfalse
extensionCOMBO7 options: png, jpg, jpeg, gif, tiff, webp, +1
dpiINT3001–2400
qualityINT1001–100
optimize_imageBOOLEANfalse
lossless_webpBOOLEANtrue
embed_workflowBOOLEANtrue
save_generation_dataBOOLEANfalse
remove_promptsBOOLEANfalse
save_workflow_as_jsonBOOLEANfalse
add_loras_to_promptBOOLEANfalse
show_previewsBOOLEANfalse
pipe_optoptpipe

Outputs (2)

NameTypeDescription
imagesIMAGE
filesSTRING