Nodes/Comfy-MSS/Save Audio
ComfyUI Node

Save Audio

Three formats, a filename you must wire, and no overwrites ever

By pymss-project·Created 4 months ago·Updated a day ago· 22
Save Audio
  • audio
    output_formatwav
    sample_rate44100
    wav_bit_depthFLOAT
    flac_bit_depthPCM_24
    mp3_bit_rate320k
    filename

    What it is

    An output node that writes ComfyUI AUDIO streams to disk as wav, flac or mp3, with a real choice of sample rate and bit depth instead of whatever the graph happened to carry. It has no outputs at all - it's a terminal node, like Save Image. It runs whenever the graph runs.

    The reason to use this over ComfyUI's core audio savers is control. Core's SaveAudio family (FLAC, MP3, Opus) is marked deprecated in favour of SaveAudioAdvanced, and while those work, they expose a filename_prefix with formatting tokens rather than a fixed set of format/rate/depth options. Here you pick the exact thing: 24-bit FLAC, or 320k MP3, or float WAV, at 32/44.1/48kHz.

    Inputs

    • audio - the stream. Wire a stem from any separator, or the output of Audio Ensemble.
    • output_format - wav, flac, mp3.
    • sample_rate - 32000, 44100, 48000, default 44100. If the incoming audio is at a different rate it gets resampled on the way out.
    • wav_bit_depth - FLOAT, PCM_24, PCM_16. Defaults to FLOAT, which is the right choice while you're still processing; PCM_24 for delivery.
    • flac_bit_depth - PCM_24 or PCM_16, default PCM_24.
    • mp3_bit_rate - 128k, 192k, 256k, 320k, default 320k.
    • filename - optional, and forced: it's an input socket, not a box you can type in. So you have to build the name from something else. Load Audio's audio_name plus a separator's stem_N (String) through core's Concatenate Text is the pattern the pack's own README suggests, and it gets you mysong_vocals.wav instead of a timestamp.

    The bit-depth and bitrate widgets are hidden dynamically - pick mp3 and only mp3_bit_rate survives on the node, which keeps it from becoming a wall of irrelevant dropdowns.

    Where the files land, and why that surprises people

    Straight in ComfyUI's output root - ComfyUI/output/ - not ComfyUI/output/audio/ where core's savers put things. If you're used to finding audio in a subfolder, you'll think the save failed. It didn't.

    Naming rules, in order:

    1. filename if you wired one and it isn't empty.
    2. Otherwise audio_YYYYMMDD_HHMMSS.
    3. With a batch bigger than one, each item gets _00000-style indices appended.
    4. Existing files are never overwritten. If the target path exists, a numeric suffix is appended (mysong_vocals_00001.wav). This is the pack being careful, and it's why a rerun of the same graph leaves you with a growing pile - the second run doesn't replace the first.

    Saving is done through pymss's own AV-based writer, and the list of paths it wrote comes back to the frontend, so the node reports what it did.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/pymss-project/comfy-mss
    python -m pip install pymss   # ComfyUI's Python env
    

    Manager → Comfy-MSS works too. Restart after. The av dependency that does the actual encoding arrives with pymss; you don't install it yourself.

    Gotchas

    • No passthrough. Unlike core's SaveAudio, this node doesn't forward the audio, so you can't chain a preview after it. Branch the wire: one copy to Save Audio, one to a preview node.
    • Wire the filename or accept timestamps. It's a forced input on purpose; the timestamp fallback is a safety net, not a filename strategy.
    • Sample rate is a real resample, not a label. Saving a 44.1kHz stem as 48000 genuinely resamples it; that's usually what you want when the downstream video pipeline expects 48k.
    • MP3 at 320k is still MP3. For stems you intend to process further, save FLOAT WAV or 24-bit FLAC and encode once at the end.
    Categoryaudio/pymss

    Inputs (7)

    NameTypeDefaultDescription
    audioAUDIO
    output_formatCOMBOwav3 options: wav, flac, mp3
    sample_rateCOMBO441003 options: 32000, 44100, 48000
    wav_bit_depthCOMBOFLOAT3 options: PCM_16, PCM_24, FLOAT
    flac_bit_depthCOMBOPCM_242 options: PCM_16, PCM_24
    mp3_bit_rateCOMBO320k4 options: 128k, 192k, 256k, 320k
    filenameoptSTRING

    Outputs (0)

    No outputs