MD: Advanced Audio Preview & Save
Normalize, export, and embed your workflow in one node
- audio
- AUDIO
- waveform_before
- waveform_after
If you've ever generated a track with ACE-Step and then fumbled between a DAW and a loudness meter to get a file worth posting, this node is the shortcut. Advanced Audio Preview & Save (the pack calls it AAPS) is the terminal output node for audio workflows: it normalizes to a platform loudness standard, exports to MP3/FLAC/OPUS, embeds your workflow JSON as metadata, and shows before/after waveforms - all in one step.
It's the audio equivalent of a polished image Save node, and it's where most MD Nodes audio pipelines are meant to end.
How it works
The flow is: normalize → effect → encode → save. It reads a standard AUDIO dict, applies a normalization preset, optionally runs a soft limiter, converts channels if asked, applies fades, then writes the file. The two presets do most of the thinking:
norm_preset- Spotify (-14 LUFS), YouTube Loud (-13), Apple Music (-16), Broadcast EBU R128 (-23), Mastering Headroom (-8), Podcast ACX (-18 RMS), Audiobook ACX (-23 RMS), Peak Normalize Only, or Custom. Pick your platform, done.format_preset- High Quality MP3 V0, Web Streaming MP3 128k, Archive/Master FLAC, Voice OPUS 64k, or Music Streaming OPUS 128k.
Set both to Custom and the manual controls unlock: normalize_method (Off/Peak/RMS/LUFS), target_lufs_db, target_rms_db, save_format (mp3/flac/opus), mp3_quality, opus_quality.
The inputs that matter
save_to_disk- writes the file (False still normalizes and previews, but skips I/O).filename_prefix- strftime patterns supported, e.g.audio_%Y%m%d→audio_20251228_00001.mp3.save_metadata- embeds the workflow JSON into the file. This is the ComfyUI culture part: drag the file back and the whole graph reconstructs. If the payload exceeds 256KB, it auto-writes a.jsonsidecar instead.custom_notesgoes into aComfyUI_Notesmetadata field.channel_mode,fade_in_ms/fade_out_ms- stereo/mono and fades.use_limiter- a fast soft limiter at -1.0dB ceiling after normalization; keeps math overshoot from clipping. Keep it on.force_save- bypasses ComfyUI's caching so every run writes a new file.
Outputs: AUDIO (pass-through of what was saved), plus waveform_before and waveform_after images - a quick visual confirmation that the normalize didn't wreck the dynamics.
The gotchas
Two real ones. First, LUFS normalization shells out to ffmpeg - the source literally calls ffmpeg -y ... - so if ffmpeg isn't on your PATH, normalization fails. Make sure it's installed before you blame the node. Second, the pack migrated from torchaudio to soundfile for I/O, so the soundfile requirement is load-bearing; if audio I/O errors appear, it's missing from your env. And as always with metadata embedding, a file with embedded workflow JSON is heavier than a bare one - that's the trade for reproducibility.
Installing
It's part of MD Nodes:
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
Or via ComfyUI Manager (search MD Nodes), then restart.
Bottom line: if you're shipping AI-generated audio, this node turns "generated a track" into "posted a properly loud, metadata-stamped file" in one shot. The preset system means you rarely touch the manual controls, and the metadata embedding is the exact feature ComfyUI culture expects from a final save node.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | AUDIO INPUT • Purpose: The raw audio waveform to be processed and saved. • Requirement: Standard ComfyUI AUDIO dict. | |
| norm_preset | COMBO | Spotify Standard (-14 LUFS) | NORMALIZATION PRESET • Purpose: Automatically sets LUFS/RMS targets to match industry standards. • Options: Spotify (-14), Broadcast (-23), Custom (Manual overrides). ⭐ Recommended: 'Spotify Standard' for general distribution. |
| format_preset | COMBO | High Quality (MP3 V0) | FORMAT PRESET • Purpose: Sets container format and codec quality. • Options: High Quality (MP3 V0), Archive (FLAC), Voice (OPUS). ⭐ Recommended: 'High Quality (MP3 V0)' |
| save_to_disk | BOOLEAN | true | SAVE TO DISK • Purpose: Writes the processed audio to the ComfyUI output directory. • Effect: False will still normalize and preview the audio, but skip file I/O. ⭐ Recommended: True. |
| filename_prefix | STRING | ComfyUI_audio_%Y%m%d | FILENAME PREFIX • Purpose: Sets the output file naming scheme. • Support: Standard strftime patterns (%Y-%m-%d, %H-%M-%S). • Example: 'audio_%Y%m%d' -> 'audio_20251228_00001.mp3' |
| save_format | COMBO | mp3 | SAVE FORMAT (Custom) • Purpose: Manual selection of output container. • Requirement: Active only if Format Preset is set to 'Custom'. |
| save_metadata | BOOLEAN | true | SAVE METADATA • Purpose: Embeds workflow JSON directly into the audio file. • Logic: Automatically generates a .json sidecar if payload > 256KB. ⭐ Recommended: True. |
| custom_notes | STRING | CUSTOM NOTES • Purpose: Embeds user text in the 'ComfyUI_Notes' metadata field. | |
| channel_mode | COMBO | Keep Original | CHANNEL MODE • Purpose: Controls stereo imaging downmixing. • Options: Keep Original (Stereo), Convert to Mono. ⭐ Recommended: Keep Original. |
| fade_in_ms | INT | 00–10000 | FADE IN • Purpose: Linearly ramps volume up at the start (in ms). |
| fade_out_ms | INT | 00–10000 | FADE OUT • Purpose: Linearly ramps volume down at the end (in ms). |
| normalize_method | COMBO | LUFS | NORMALIZE METHOD (Custom) • Purpose: Mathematical approach to adjusting volume. • Options: LUFS (Perceived), RMS (Average), Peak (Max Amplitude). • Requirement: Active only if Norm Preset is 'Custom'. ⭐ Recommended: LUFS. |
| target_rms_db | INT | -16-60–0 | TARGET RMS • Purpose: DB target level for RMS normalization. |
| target_lufs_db | FLOAT | -14.0-50–-5 | TARGET LUFS • Purpose: LUFS target level for LUFS normalization. |
| use_limiter | BOOLEAN | true | USE LIMITER • Purpose: Applies a fast soft limiter (-1.0dB ceiling) after normalization. • Effect: Prevents digital clipping from math overshoot. ⭐ Recommended: True. |
| mp3_quality | COMBO | V0 | MP3 QUALITY • V0: Best Variable Bitrate (~245kbps). • 320k: Best Constant Bitrate. • 128k: Web standard. |
| opus_quality | COMBO | 128k | OPUS QUALITY • 128k: Music / High Quality. • 64k: Voice / Podcast. |
| debug_mode | COMBO | 0 - Silent | LOGGING VERBOSITY • Purpose: Controls console output and structural profiling. • Options: 0 (Silent), 1 (Analytics Report), 2 (Full trace). ⭐ Recommended: 0 - Silent. |
| enable_profiling | BOOLEAN | false | ENABLE PROFILING • Purpose: Measure file I/O and normalization times. • Note: Automatically enabled if debug_mode >= 1. |
| force_save | BOOLEAN | false | FORCE SAVE • Purpose: Bypasses ComfyUI caching to always generate a new file on disk. • Note: Triggers node execution every run. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | — |
| waveform_before | IMAGE | — |
| waveform_after | IMAGE | — |