Nodes/ComfyUI-xiaozhuguang/小珠光音频保存
ComfyUI Node

小珠光音频保存

Where did the audio go? This save node tells you, and lets you preview without saving

By xiaozhuguang·Created 2 months ago·Updated a day ago· 56
小珠光音频保存
  • 音频
    格式mp3
    质量128
    文件名前缀xzg-audio
    模式保存
    音量1.00

    Core ComfyUI still doesn't have a first-party audio save node worth the name - you're usually hunting through whatever VHS or audio pack you happened to install. 小珠光音频保存 (Xiaozhuguang Audio Save) is the tidy answer from the 小珠光 suite: it takes an AUDIO tensor, writes it to output/ as MP3, WAV, or FLAC, and - the genuinely nice part - has a preview mode that encodes to temp/ instead, so you can audition audio in a pipeline without polluting your output folder with 40 test files.

    It's the natural end of the line after the pack's audio loader or its AudioDiT TTS nodes: generate speech, wire the AUDIO in, pick a format and bitrate, run.

    How it works

    The node hands the waveform to FFmpeg and lets it do the encoding. MP3 gets the bitrate from the 质量 (quality) dropdown (320 / 192 / 128 kbps); WAV and FLAC are lossless, so the quality setting is ignored. In save mode (模式 = 保存) the file lands in output/ with your 文件名前缀 plus a counter; in preview mode (模式 = 预览) it lands in temp/ with a random tag and is flagged as preview. Either way it returns waveform peak data so the on-node display can draw the result - the front end shows you the actual encoded audio with a playable waveform, and has a "send to audio loader" right-click that routes the file straight back into the pack's loader node for round-tripping.

    The node needs a working ffmpeg, same as the loader: the pack depends on imageio-ffmpeg, which ships a static binary, with a system ffmpeg as fallback. If neither exists you'll get a clear "FFmpeg not found" error rather than a silent failure.

    The inputs that matter

    • 音频 (Audio) - the AUDIO tensor to save. No connections, nothing happens.
    • 格式 - mp3, wav, or flac.
    • 质量 - bitrate for mp3 only.
    • 文件名前缀 - filename stem, default xzg-audio.
    • 模式 - 保存 (save to output) or 预览 (preview to temp).
    • 音量 - preview-only gain; it doesn't touch the file you save.

    It's an output node (no outputs), which means it's one of the endpoints the ComfyUI cache works backward from - if you remove it, nothing downstream of it runs.

    Install

    From the ComfyUI-xiaozhuguang pack - Manager (search "ComfyUI-xiaozhuguang"), or:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/xiaozhuguang/ComfyUI-xiaozhuguang.git
    

    Restart after. If the save fails with an ffmpeg error, pip install imageio-ffmpeg in your ComfyUI environment.

    Gotchas

    The two things that bite people: preview files in temp/ get cleaned up - if you close ComfyUI after a preview, the file is likely gone, so flip to save mode before you rely on a file being there. And the preview-only 音量 widget doesn't affect the saved file; a workflow that previews at 0.5 and saves at full volume will surprise you if you forget. Save mode is the one that writes what you hear at 1.0.

    Categoryxiaozhuguang

    Inputs (6)

    NameTypeDefaultDescription
    音频AUDIO
    格式COMBOmp33 options: mp3, wav, flac
    质量COMBO1283 options: 320, 192, 128
    文件名前缀STRINGxzg-audio
    模式optCOMBO保存2 options: 保存, 预览
    音量optFLOAT1.000–3

    Outputs (0)

    No outputs