Nodes/MD Nodes/MD: Advanced Media Save
ComfyUI Node

MD: Advanced Media Save

One save node for every format, with the workflow baked in

By MDMAchine·Created about a year ago·Updated 3 months ago· 15
MD: Advanced Media Save
  • images
  • file_path
filename_prefixAMS_%Y-%m-%d
save_formatPNG
save_metadatatrue
custom_notes
jpeg_quality95
webp_quality90
webp_losslesstrue
framerate8.0
video_quality8
debug_mode0 - Silent

The default Save Image node has been doing the same job for years and never got a nickname. This is the version you switch to when you stop saving PNGs one at a time and start wanting a single node that handles stills and animations, embeds your workflow, and names files like a person instead of ComfyUI_00042_.

AdvancedMediaSave takes your IMAGE batch and writes it out as PNG, JPEG, or WEBP - or, if you pick one of the animation formats, compiles the whole batch into a single GIF, MP4 (H.264), or WEBM (VP9). One node, six formats. That's the whole pitch, and for batch-heavy work it genuinely removes a node and a half from your graph.

How it works

The filename side is where the polish shows. filename_prefix accepts Python strftime codes, so AMS_%Y-%m-%d becomes a dated folder prefix, and the node automatically appends a timestamp so you never overwrite a previous run. Keep the default or prepend a project name - the tooltip's suggestion of projectX_%Y-%m-%d is a good habit.

Formatting is straightforward. jpeg_quality (default 95) and webp_quality (90) are there when you want smaller files; webp_lossless defaults to true, which means quality-perfect WEBPs that are noticeably fatter. For animations, framerate defaults to 8fps - the classic GIF look - and video_quality (1-10, default 8) controls the H.264/VP9 encode. If you're saving a batch as MP4 for actual playback you'll probably want to nudge the framerate up past 8.

The metadata behavior is the ComfyUI-native part. save_metadata defaults to true, embedding the full workflow and prompt into the file - the "drag the image back in and the whole graph reconstructs" trick the ecosystem runs on. One gotcha the tooltip is honest about: very large workflows bloat file size, and past 256KB the node switches to a sidecar JSON instead. If you share images publicly and care about privacy, flip it off. custom_notes lets you add personal text to that metadata, but only embeds when metadata saving is on.

You get a file_path STRING out, which is handy for wiring into a text display or a downstream node that needs to know where things landed.

Installing it

Everything ships in MD Nodes (MDMAchine/ComfyUI_MD_Nodes), so this arrives alongside 80+ siblings. Easiest route is ComfyUI Manager - search for MD_Nodes and hit Install. Manual route:

cd path/to/ComfyUI/custom_nodes
git clone https://github.com/MDMAchine/ComfyUI_MD_Nodes.git
cd ComfyUI_MD_Nodes
pip install -r requirements.txt

Restart ComfyUI after. Python 3.10+, PyTorch 2.0+ with CUDA, and the pack is GPL v3 pure-Python source - no hidden binaries. Note the requirements file is heavy (audio DSP, LLM glue, and more), so a bare pip install -r requirements.txt is the safe move even though most of it is irrelevant to saving images.

Common issues

The one that bites: animation saving needs imageio, and the source warns it will silently disable GIF/MP4/WEBM if that import is missing. If your static saves work but animations fail, pip install imageio (and imageio-ffmpeg for MP4/WEBM) and restart. Everything else - the timestamp suffix, the sidecar metadata switch, the format list - behaves exactly as labeled.

CategoryMD_Nodes/Save

Inputs (11)

NameTypeDefaultDescription
imagesIMAGEIMAGE INPUT • Purpose: The image or batch of images to save. • Format: Standard ComfyUI IMAGE tensor [batch, height, width, 3].
filename_prefixSTRINGAMS_%Y-%m-%dFILENAME PREFIX • Purpose: Prefix for the saved file(s). • Options: Supports strftime codes (e.g., %Y, %m, %d, %H, %M, %S). • Note: Automatically appended with a timestamp to prevent overwrites. ⭐ Recommended: Keep default or add project name (e.g., 'projectX_%Y-%m-%d').
save_formatCOMBOPNGSAVE FORMAT • Purpose: Choose the output file format. • Static: PNG, JPEG, WEBP save each image in the batch individually. • Animation: GIF, MP4, WEBM compile the batch into a single video file. ⭐ Recommended: PNG for highest quality static images.
save_metadataoptBOOLEANtrueSAVE METADATA • Purpose: Toggle embedding workflow and prompt data into the file. • Trade-offs: Large workflows may bloat file sizes. Automatically triggers Sidecar JSON if > 256KB. ⭐ Recommended: True (unless sharing publicly and privacy is needed).
custom_notesoptSTRINGCUSTOM NOTES • Purpose: Add personal text notes to the file's metadata. • Note: Only embedded if 'Save Metadata' is True.
jpeg_qualityoptINT951–100JPEG QUALITY • Purpose: Compression quality for JPEG formats. • Range: 1 (Lowest) to 100 (Highest). ⭐ Recommended: 95 for best balance of size and quality.
webp_qualityoptINT901–100WEBP QUALITY • Purpose: Compression quality for lossy WEBP formats. • Note: Ignored if 'WEBP Lossless' is enabled. ⭐ Recommended: 90.
webp_losslessoptBOOLEANtrueWEBP LOSSLESS • Purpose: Forces WEBP to save with zero quality loss. • Trade-offs: Perfect quality but significantly larger file sizes. ⭐ Recommended: True.
framerateoptFLOAT8.00.1–60FRAMERATE (FPS) • Purpose: Playback speed for animation formats (GIF, MP4, WEBM). • Options: 8-12 fps is common for standard GIF generations. ⭐ Recommended: 8.0
video_qualityoptINT81–10VIDEO QUALITY • Purpose: Internal quality parameter for MP4 (H.264) and WEBM (VP9). • Range: 1 (Lowest) to 10 (Highest lossless). ⭐ Recommended: 8.
debug_modeoptCOMBO0 - SilentLOGGING VERBOSITY • Purpose: Controls console output and enables disk I/O profiling. • Options: 0 (Silent), 1 (Info/Stats), 2 (Verbose). ⭐ Recommended: 0 - Silent for standard production.

Outputs (1)

NameTypeDescription
file_pathSTRING