ComfyUI Node

Save Audio As MP3

Your video model made audio — here's how you actually keep it

By Pigidiy·Created about a year ago·Updated about a year ago· 1
Save Audio As MP3
  • audio
  • audio
bitrate_kbps192

Video models with native audio - LTX 2.3, the Wan audio stage, or MMAudio bolted onto a clip - hand you an AUDIO wire in ComfyUI. The waveform lives in memory, you can preview it in the UI, and then… nothing. There's no file on disk. That's the exact gap this node fills: SaveAudioAsMP3 takes that AUDIO and writes an actual .mp3 into ComfyUI/output/audio/. That's the whole thing, and honestly the whole thing is enough.

It's the single node in Pigidiy's little ComfyUI-LikeSpiderAI-SaveMP3 pack, found under the LikeSpiderAI category in the node menu. For a custom-node ecosystem where half your installs drag in their own torch version and a requirements.txt the size of a novella, this one is refreshingly boring: no API, no key, no model downloads, no UI hacks. Pure Python that shells out to ffmpeg.

How it works

Short pipe, and it's worth knowing because it explains both requirements. The node grabs audio["waveform"] (a torch tensor), moves it to CPU as numpy, normalizes anything hotter than ±1.0, and scales it to 16-bit int. Then it writes a temporary WAV with scipy and runs:

ffmpeg -y -i temp_input.wav -codec:a libmp3lame -b:a 192k output/audio/audio_00000.mp3

then deletes the temp file. That's why ffmpeg has to be installed and on your PATH - the node checks with shutil.which() and fails with a clear error if it can't find it, before it writes anything. It also returns the original AUDIO untouched on its output, purely so the UI preview keeps working; you don't need to wire that passthrough anywhere. Since it's an output node, it just runs at the end of the workflow and doesn't block anything downstream.

The inputs that matter

Two inputs, one passthrough output. That's the entire surface:

  • audio (AUDIO, required) - any node that outputs AUDIO. This is what makes it universal: it doesn't care which model produced the sound.
  • bitrate_kbps - dropdown of 64 / 128 / 192 / 256 / 320, default 192. 192 is a sensible default for speech and most model-generated clips. Drop to 64 for small voiceover files, go 320 if you're keeping music.

Installing it

The README's path, which works fine:

cd ComfyUI/custom_nodes
git clone https://github.com/Pigidiy/ComfyUI-LikeSpiderAI-SaveMP3.git

then restart ComfyUI. Or use ComfyUI Manager and search for "Save Audio As MP3". Note there's no requirements.txt in the pack - it reuses numpy, torch, and scipy that ship with ComfyUI itself, so the only thing you install yourself is ffmpeg (Windows: winget install ffmpeg or a Gyan build; Linux: sudo apt install ffmpeg). No heavy dependencies to fight, which is rarer than it should be in this ecosystem.

Where people get burned

  • Sample rate. The temp WAV is hardcoded to 44100 Hz. Feed it 48 kHz audio - which a lot of video models output - and your file silently comes out at 44.1 kHz. Fine for casual use; don't hand this to an audio editor with a straight face.
  • Numbering. Files are audio_00000.mp3 counting up from whatever already sits in output/audio/. Clean that folder out and the counter resets, so you can clobber an earlier export without noticing.
  • Mono or stereo only. Anything beyond two channels raises an error, so don't feed it multichannel sources.

If all you need is to get a generated clip's soundtrack onto disk so you can actually use it, this is the one. It's a nail, and it's the right hammer.

CategoryLikeSpiderAI

Inputs (2)

NameTypeDefaultDescription
audioAUDIO
bitrate_kbpsCOMBO1925 options: 64, 128, 192, 256, 320

Outputs (1)

NameTypeDescription
audioAUDIO