RM Save Image With Metadata
Saves PNGs with the workflow baked in — after you fix the hardcoded paths
- images
- styles_pipe
- saved_paths
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.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| styles_pipe | RM_STYLES_PIPE | — | |
| destination | COMBO | 2 options: Sketchbook, Playground | |
| plot | COMBO | 3 options: yes, no, both | |
| step_nameopt | STRING | — | |
| step_indexopt | INT | 00–9999 | — |
| roleopt | COMBO | final | 2 options: final, intermediate |
| branchopt | STRING | — | |
| parent_pathopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| saved_paths | STRING | — |