ComfyUI Node

Save Audio Smart Prefix

The saver that writes [Album] - [Title].flac, embeds cover art, and drops a JSON sidecar

By jplenio·Created about 16 hours ago·Updated about 15 hours ago· 0
Save Audio Smart Prefix
  • audio
  • audio
  • saved_path
  • metadata_path
filename_prefix
formatflac
collision_modeauto_increment
create_directoriestrue
mp3_qualityV0 (~245 kbps)
flac_bit_depth24-bit
wav_bit_depth32-bit float
peak_handlingleave_unchanged
write_json_sidecartrue
embed_basic_metadatatrue
title
metadata_json
audio_tags_json
cover_image_path
filename_modealbum - title
embedded_cover_size512

This is the release end of the whole pipeline, the node where a folder of AI tracks becomes something you could actually upload. Save Audio Smart Prefix is the pack's flagship saver: it writes FLAC/MP3/WAV to smart relative paths (normally fed by MiniMax Output Paths), names files [Album] - [Title].flac, embeds standard tags, embeds your cover art at a controlled resolution, and writes the reproducibility JSON sidecar next to the audio. It's the "finish the release" node, and it's an output node - the chain ends here.

The [Album] - [Title] naming is worth calling out because it's the kind of small decision that separates a release from a pile of files: the filesystem name comes from the Album and Title tags, while the embedded Title metadata stays just the song title. Clean names for humans, clean tags for players, and the sidecar holds everything else.

Inputs that matter

  • audio - the final mastered signal.
  • filename_prefix - normally the prefix from MiniMax Output Paths; the node appends extension and collision suffix.
  • format - flac (default), mp3, wav. Plus mp3_quality, flac_bit_depth, wav_bit_depth, and peak_handling, same set as the absolute-path saver.
  • collision_mode / create_directories - same guards as its sibling.
  • write_json_sidecar (default true) - writes the connected metadata_json next to the audio. Keep it on; this is the reproducibility payoff.
  • embed_basic_metadata (default true) - embeds the audio_tags_json tags in formats that support them.

The interesting optional inputs: metadata_json (from MiniMax Song Metadata), audio_tags_json (from MiniMax Standard Audio Tags), cover_image_path (the cover JPG - the source file is never modified, only a JPEG copy is embedded), filename_mode (album - title default, title only, or prefix as provided), and embedded_cover_size (default 512; the workflow links it to MiniMax Square Image Size, so a 1024 cover can embed at 1024). The tooltip's advice is worth taking: some older players prefer 512 or 1024, and bigger art makes bigger files.

Outputs

audio (passthrough), saved_path, and metadata_path (where the sidecar landed).

Installing it

Pack install via ComfyUI Manager (search "MiniMax Music Production Toolkit") or:

cd ComfyUI/custom_nodes
git clone https://github.com/jplenio/ComfyUI-MiniMax-Music-Production-Toolkit.git
cd ComfyUI-MiniMax-Music-Production-Toolkit
python -m pip install -r requirements.txt

Dependencies: scipy, soundfile, imageio-ffmpeg, mutagen, Pillow - mutagen does the tags/cover embedding. Restart ComfyUI and hard-refresh once.

Gotchas

If the sidecar doesn't appear, write_json_sidecar is off or metadata_json was never connected - the node can't write a sidecar it was never given. If embedded art looks wrong, check embedded_cover_size and remember it's a square target: a non-square source gets treated as a square, so keep art 1:1. And the filename_mode only changes the filesystem name, never the metadata Title - if your files are named oddly, that's where to look before you go hunting through the whole workflow.

CategoryMiniMax Music Production Toolkit/save

Inputs (17)

NameTypeDefaultDescription
audioAUDIOComfyUI AUDIO signal to process. The node preserves channel layout unless its processing explicitly states otherwise; check the node's Info/JSON output for sample-rate or level changes.
filename_prefixSTRINGOutput prefix/path for the audio file, normally supplied by MiniMax Output Paths. The node adds the selected extension and a collision suffix if required.
formatCOMBOflacAudio file format to write. FLAC is lossless, WAV is uncompressed PCM/float, and MP3 is lossy and intended mainly for convenient previews/distribution where appropriate.
collision_modeCOMBOauto_incrementWhat to do when the target file already exists: auto_increment creates a new numbered filename, overwrite replaces it, and error_if_exists stops with an error.
create_directoriesBOOLEANtrueCreate missing output folders automatically. Disable only if you deliberately want saving to fail when the destination directory does not already exist.
mp3_qualityCOMBOV0 (~245 kbps)MP3 encoder quality/bitrate. V0 is high-quality variable bitrate; fixed 320 kbps is the highest listed constant bitrate. This setting has no effect when saving FLAC or WAV.
flac_bit_depthCOMBO24-bitPCM bit depth used inside the lossless FLAC file. 24-bit is recommended for a release/master archive; 16-bit is smaller and appropriate when explicitly required.
wav_bit_depthCOMBO32-bit floatSample representation used for WAV. 32-bit float preserves headroom without integer clipping; 24-bit is a common release/master format; 16-bit is lower precision.
peak_handlingCOMBOleave_unchangedOptional final safety handling in the saver. leave_unchanged writes the signal as received; normalize_only_if_clipping applies one constant gain only when sample peaks exceed full scale. It does not perform loudness normalization.
write_json_sidecarBOOLEANtrueWrite the connected metadata_json next to the audio file using the same base name. Recommended for reproducibility.
embed_basic_metadataBOOLEANtrueEmbed standard title/artist/album/etc. tags in the audio file when the selected format supports them. Production configuration stays in the JSON sidecar rather than custom audio tags.
titleoptSTRINGSong title used for metadata, filenames or the reproducibility JSON, depending on the node. This does not alter the audio signal itself.
metadata_jsonoptSTRINGComplete production/reproducibility JSON to save beside the audio. The saver writes it unchanged apart from file handling.
audio_tags_jsonoptSTRINGStandard audio-tag JSON (artist, album, year, genre, etc.) produced by MiniMax Standard Audio Tags and embedded into compatible audio formats.
cover_image_pathoptSTRINGPath to the generated cover JPG. When connected, the saver embeds a JPEG copy as cover art in supported formats. The source JPG is never modified.
filename_modeoptCOMBOalbum - titleControls only the filesystem filename, never the metadata Title. album - title creates [Album] - [Title].extension from audio_tags_json; title only uses only the Title tag; prefix as provided keeps the basename supplied by MiniMax Output Paths. Invalid filename characters are sanitized safely.
embedded_cover_sizeoptINT51264–4096Target square resolution in pixels for the cover image embedded inside FLAC/MP3 metadata. In the supplied workflow this is linked directly to MiniMax Square Image Size, so a 1024x1024 JPG also embeds as 1024x1024. Larger embedded art increases audio-file size and some older players may prefer 512 or 1024.

Outputs (3)

NameTypeDescription
audioAUDIO
saved_pathSTRING
metadata_pathSTRING