Nodes/ComfyUI_Lam/保存音频输出
ComfyUI Node

保存音频输出

Export your generated audio as an mp3 with a quality knob

By yanlang0123·Created 2 years ago·Updated about a month ago· 76
保存音频输出
  • audio
  • audio_path
filename_prefixaudio/ComfyUI
qualityV0

When a node hands you an AUDIO tensor, ComfyUI's default preview is fine for a quick listen, but eventually you want the file on disk. LamSaveAudio (保存音频输出) does that: takes an AUDIO input, encodes it as an mp3 into your output directory, and hands back the full path so the rest of your workflow knows where it went.

The TTS and voice-cloning crowd is the main audience - the pack's IndexTTS2 nodes already write wavs themselves, but for anything else producing AUDIO (edge-tts text-to-speech, audio-to-audio, music models), this is how you capture it as a file. The path output is the real feature: you can feed it into a dubbing node, a video-muxing node, or just log it, instead of guessing where the preview saved things.

Inputs

  • audio (required) - the AUDIO tensor to encode.
  • filename_prefix - where it goes. Default audio/ComfyUI, so you get output/audio/ComfyUI_00001_.mp3.
  • quality - mp3 quality: V0 (variable, best - the default), 128k, or 320k. V0 is the "just take the good one" option; pick 128k if you're pushing lots of files and don't care.

Output

  • audio_path - the full path of the saved mp3. One quirk: the node converts the path to Windows-style double-backslash form (C:\\ComfyUI\\output\\...), which matches what its sibling nodes expect on Windows - on Linux it still resolves to a valid path but looks odd. Don't panic if you see doubled backslashes; that's by design here.

Install

Part of the ComfyUI_Lam pack:

cd ComfyUI/custom_nodes
git clone https://github.com/yanlang0123/ComfyUI_Lam

or via ComfyUI Manager, then the README's install + 修改文件 steps. No models needed - the encoding rides on the pack's audio dependencies.

Gotchas

The output is a path string, not an AUDIO tensor, so you can't chain another audio node off it directly - treat it as a terminal save plus a filename you can pass around as text. And the path-formatting quirk above will bite you if you're on Linux and feeding the string into nodes that assume forward slashes. Otherwise it's about as frictionless as a save node gets: feed audio, get mp3.

Categorylam

Inputs (3)

NameTypeDefaultDescription
audioAUDIO
filename_prefixSTRINGaudio/ComfyUI
qualityCOMBOV03 options: V0, 128k, 320k

Outputs (1)

NameTypeDescription
audio_pathSTRING