Magical Save Node
Output PNGs with metadata written in your own words
- images
Magical Save Node is a save node with opinions about metadata. Standard ComfyUI saves the whole workflow into your PNG automatically. This one goes further: it parses the workflow, finds the nodes you've renamed (right-click → Title), and writes their settings into a human-readable text file next to the image, or bakes that text into the PNG, or both. The pitch is simple - when you open an old folder of outputs, "seed 1234, CFG 7, 30 steps" is a lot more useful than a wall of JSON.
The inputs that matter
- images - the IMAGE input, wired from your VAE decode, same as the built-in Save Image node.
- Active - a master on/off switch. Off and the node saves nothing, which sounds pointless until you're building complex flows and want to bypass saving without deleting the node.
- Output_Path - subfolder under
output/, default[time(%Y-%m-%d)](a dated folder). - Name - base filename (default "ComfyUI"). Supports subfolders via
/. - Stamp - the timestamp format appended to the filename,
strftime()syntax, default%H-%M-%S-%f(hours-minutes-seconds-microseconds). Tweak it if you want filenames that sort differently. - Extension - png, jpg, tiff, bmp, or
none(no image, metadata only). - Quality - jpg compression 1–100, png compression 0–9. Note the png quirk: any value over 9 means 0, i.e. lossless.
- Save_gen_data_to_txt - writes the metadata + full workflow JSON to a
.txtfile next to the image. - Save_gen_data_to_png - embeds the same metadata into the PNG as text chunks.
- Formatting - "Human Readable" is currently the only option; the tooltip says it's there for future parsers without breaking old saves.
How it works
The node walks the workflow's node list and, for node types it knows about, extracts the settings by index - KSampler gets CFG/steps/sampler/denoise/seed, KSamplerAdvanced, EmptyLatentImage, CheckpointLoaderSimple, VAELoader, LoraLoader, even the pack's own ThermalLatenator. Every other renamed node gets a title: [widget values] dump. Then it writes that, plus the raw workflow JSON, to the txt and/or PNG. Because it keys everything off the Title, your metadata is only as readable as your node names. That's the feature and the trap: an unrenamed graph produces a mostly-useless dump of widget arrays.
The image is saved through PIL with optimize=True; filenames auto-increment with a _00001-style suffix if a file already exists. The .txt and the image share the same base name, so pairs stay together.
Installing it
One of twelve nodes in Hellrunner's Magical Nodes - install the pack once. In ComfyUI Manager search "Hellrunner's Magical Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/Hellrunner2k/ComfyUI-HellrunnersMagicalNodes.git
Restart after. No extra dependencies.
Troubleshooting
- Metadata is just raw arrays? You didn't rename your nodes. Right-click → Title and give KSamplers, checkpoints and text nodes names you'd actually want to read later.
- No file saved? Check Active is on, and remember Extension
noneskips the image entirely. - PNG quality acts weird? Any Quality above 9 maps to lossless (0). If you expected a "10 out of 100" feel, you're in the png branch - that's a compression level, not a percentage.
- The dated Output_Path means files land in a fresh folder each day. If you expected everything in one place, change Output_Path to something like
MyProject.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| Active | BOOLEAN | true | Boolean On/Off Switch for better integration in complex comfy-flows |
| Output_Path | STRING | [time(%Y-%m-%d)] | Subfolder Path into "output" |
| Name | STRING | ComfyUI | File Name |
| Stamp | STRING | %H-%M-%S-%f | timestamp format see strftime() |
| Extension | COMBO | png | Image Type |
| Quality | INT | 951–100 | jpg compression 1-100, png compression 0-9 (if > 9 = 0 lossless) |
| Save_gen_data_to_txt | BOOLEAN | true | On saves meta-data based on renamed nodes (right-click -> "Title") and the comfy-flow to a text file |
| Save_gen_data_to_png | BOOLEAN | false | On saves meta-data based on renamed nodes (right-click -> "Title") and the comfy-flow to a png image |
| Formatting | COMBO | Human Readable | Meta Data Format. Included for future expandability without node breakage |
Outputs (0)
No outputs