Save Audio (MP3)

The Save Audio (MP3) node provides a straightforward way to export generated audio waveforms as MP3 files within ComfyUI. It supports metadata, quality selection, custom file names and folders, making it ideal for music, voice, and AI sound design workflows needing ready-to-distribute audio output.

Overview

Save Audio (MP3) converts raw audio tensors or waveform data produced by upstream ComfyUI nodes into compressed MP3 files. This node handles audio export, filename conventions, and (optionally) embedding metadata, ensuring your work is shareable and compatible with all major players and applications. It integrates seamlessly with other audio processing, synthesis, or transformation nodes and outputs file information or save path for further automation.

Visual Example

Save Audio (MP3) ComfyUI node
Figure 1 - Save Audio (MP3) ComfyUI node

Official Documentation Link

https://comfyai.run/documentation/SaveAudioToMp3

Inputs

Field Example Values Explanation
audio {"waveform": ...} The audio data to be saved as an MP3 file.
filename_prefix "ComfyUI" The prefix to be used in the filename of the output.

Outputs

Field Example Output Explanation
ui [{"filename": "audio_00000_.mp3", "subfolder": "output", "type": "output"}] A JSON-like structure detailing the saved audio files.

Usage Instructions

To use Save Audio (MP3), connect the audio input to the output of an upstream waveform or audio node, such as VAE Decode Audio or an audio generator. Set filename_prefix and song_name according to your organization or naming needs. Choose the desired bitrate for MP3 encoding (128–320 kbps is common; 320 for highest quality). Specify the output_folder or use the default. Running the workflow will save your audio in MP3 format in the specified location and return the saved file details for further workflow automation or logging.

Advanced Usage

Advanced users can leverage batch mode by providing multiple audio inputs, automate filename generation for organized data sets, and embed metadata such as song name, project, or author tags for audio asset management. Integrate with upsamplers, stem separators, or tagging nodes to build full-featured audio pipelines. For broadcast or streaming, reduce bitrate for smaller files; pair with format converters to support multiple export formats from the same workflow. Output file_info can be hooked into post-processing, upload, or notification logic for advanced automation.

Example JSON for API or Workflow Export

{
  "id": "save_audio_mp3_1",
  "type": "SaveAudioMP3",
  "inputs": {
    "audio": "@audio_decoder_1",
    "filename_prefix": "track1",
    "song_name": "ambient_loop",
    "bitrate": 256,
    "output_folder": "exports/mp3"
  }
}

Tips

  • Keep filenames unique to prevent overwriting in batch exports.
  • Use 320 kbps for best quality, 128 kbps for smaller files.
  • If streaming or web, verify compatibility with target platforms before choosing bitrate.
  • Double-check output folder path exists and is writable; create folders in advance if not autoprovisioned.
  • Use file_info output for indexing and archival scripts in data-heavy audio projects.

How It Works (Technical)

The node receives an audio tensor (usually float32 PCM or similar), converts it to standard waveform if necessary, and invokes an MP3 encoder (via Python libraries such as pydub/ffmpeg or direct bindings). Bitrate and naming are set per input; output file is saved, and a metadata dictionary (containing file path, names, encoding settings, errors) is returned for downstream nodes or automation.

Github Alternatives

  • ComfyUI-SaveAudioMP3 – Community node for saving audio to MP3 with customizable bitrate and filename, using ffmpeg and pydub.
  • comfyui-save-mp3 – Flexible MP3 node; accepts various input formats, supports path and filename templates for automation.
  • ComfyUI-LikeSpiderAI-SaveMP3 – Saves audio as MP3 using ffmpeg, with selectable bitrate and easy installation.
  • ComfyUI-audio-nodes – Node pack with audio save/load and format conversion support for MP3, WAV, FLAC, and more.

Videcool workflows

The Save Audio (MP3) node is used in the following Videcool workflows:

FAQ

1. Can I batch export many MP3s at once?
Yes, connect batch outputs to this node and make sure to use unique filenames or dynamic filename generation.

2. What do I need to install for MP3 export?
Most custom nodes require Python's pydub and ffmpeg on your system. Follow node-specific install instructions.

3. Where does the node save files?
By default, into output/audio or the folder you specify in output_folder. The file_info output shows the path.

Common Mistakes and Troubleshooting

Common issues include missing dependencies (ffmpeg or pydub not installed), folder write permissions, or filename collisions causing overwrites. Always check your Python environment and system for required external libraries and binaries. If no file is produced, confirm the upstream audio node outputs a valid waveform, and check the log for errors on path or codec. Lower-end systems may stall on large batches; export in increments if so. On “file not found” errors, confirm the output folder exists or adjust node settings.

Conclusion

Save Audio (MP3) is the crucial node for audio-centric workflows in ComfyUI, offering quick, configurable, and compatible audio export for everything from AI music to podcasts—ensuring your generated content is ready for sharing, distribution, and archival.

More information