Nodes/ComfyUI-RMAutomation/RM Save Image With Metadata
ComfyUI Node

RM Save Image With Metadata

Saves PNGs with the workflow baked in — after you fix the hardcoded paths

By Moser9815·Created 7 months ago·Updated 7 days ago· 0
RM Save Image With Metadata
  • images
  • styles_pipe
  • saved_paths
destination
plot
step_name
step_index0
rolefinal
branch
parent_path

This node is a snapshot of one person's personal workflow - the author's, specifically - and it does one very ComfyUI thing well: it saves a PNG with the full generation prompt and workflow metadata embedded as PNG text chunks, so you can drag the file back into ComfyUI later and the whole graph reconstructs. That's the "workflow included" culture in a file. But before you fall in love with it, know what you're actually getting, because the metadata part is general while the destination logic is aggressively personal.

How it works

It takes your images plus a required styles_pipe (RM_STYLES_PIPE), reads the prompt number out of the pipe (index 6 in the tuple), and saves each frame as <prompt_number>_<timestamp>.png. Into every file it writes the workflow prompt JSON and all extra_pnginfo as PNG metadata - the same round-trip mechanism ComfyUI itself uses. The plot enum decides the folder layout: yes saves to a "Contact Sheets" folder, no to Images/<prompt_number>, both to both.

Here's the rub: destination is an enum of Sketchbook and Playground, and those map to hardcoded absolute Windows paths - C:\Users\rober\OneDrive\Documents\Sketchbook and C:\Users\rober\Playground. That's the author's machine, spelled out in the source. On any other machine, this node will create those literal folders on whatever drive exists or fail on a non-Windows box.

Inputs and outputs that matter

  • images (IMAGE, required)
  • styles_pipe (RM_STYLES_PIPE, required) - the node refuses to make sense without it; the prompt number and metadata both come from here.
  • destination (enum: Sketchbook / Playground)
  • plot (enum: yes / no / both)
  • No outputs - it's an output node, terminal by design.

How to install it

cd ComfyUI/custom_nodes
git clone https://github.com/Moser9815/ComfyUI-RMAutomation

Restart ComfyUI, find it under RMAutomation/Image. It needs Pillow, which any working ComfyUI already has.

Common issues

This is the most "your mileage will vary" node in the pack. The honest review: on a stock machine, the hardcoded destination paths will not do what you want. Either edit the base_dirs dict in nodes/save_image_with_metadata.py to your own folders, or treat this as a template for what metadata-saving should look like and use a save node that takes a normal output path instead. The other gotcha is the required styles_pipe - this node is deliberately coupled to the pack's styles system, so it's dead weight in a workflow that doesn't have one. If you're already committed to the RM styles pipeline, it's genuinely handy; if not, the stock Save Image plus ComfyUI's default metadata does the same round-trip with less ceremony.

CategoryRMAutomation/Image

Inputs (9)

NameTypeDefaultDescription
imagesIMAGE
styles_pipeRM_STYLES_PIPE
destinationCOMBO2 options: Sketchbook, Playground
plotCOMBO3 options: yes, no, both
step_nameoptSTRING
step_indexoptINT00–9999
roleoptCOMBOfinal2 options: final, intermediate
branchoptSTRING
parent_pathoptSTRING

Outputs (1)

NameTypeDescription
saved_pathsSTRING