Nodes/Anymatix/Anymatix Save Audio
ComfyUI Node

Anymatix Save Audio

Write an AUDIO object to a real file — mp3, wav, flac, or aac — without fighting codecs

By Anymatix·Created about a year ago·Updated 2 days ago· 0
Anymatix Save Audio
  • audio
    output_pathanymatix/results
    filename_prefixaudio
    formatmp3
    quality320k

    Audio generation in ComfyUI is very much a thing now - video models like LTX-2 produce sound as well as pictures, and their output arrives as an AUDIO object sitting in memory. The last mile is still the boring part: getting that object onto disk as a file you can actually play. AnymatixSaveAudio is that last mile. Feed it an AUDIO object, pick a format, and it writes an mp3, wav, flac, or aac file - encoding done by PyAV under the hood, no ffmpeg command-line wrangling.

    The interesting behaviour is in the details, and the source is refreshingly explicit about them. First, it's happy with silence: if the input audio is None (say, a video that turned out to have no audio track), it prints "skipping audio save - no audio data available" and returns cleanly instead of crashing your whole graph. That one graceful fallback has saved more workflows than you'd think - audio presence is not guaranteed in video outputs, and a save node that hard-fails on a silent video is a workflow-killer.

    Second, it writes losslessly for the lossless formats. WAV and FLAC get no bit-rate knob because they don't have one to argue about; only the lossy codecs do. For mp3 you pick a quality value from 320k down to 128k, or V0 - the VBR option, which maps to a qscale of 1 and is the "best practical mp3" choice if you care about the file size. AAC gets a fixed 256k bit rate regardless (the code treats it as "one sane setting, done").

    Inputs

    • audio (AUDIO) - the waveform from your generation or decode node.
    • output_path (default anymatix/results) - subdirectory under ComfyUI's output folder.
    • filename_prefix (default audio) - base name; the extension is derived from the format you pick, so you don't type it.
    • format (optional, default mp3) - mp3, wav, flac, or aac. MP3 stays the default on purpose: the pack's own contract says a save with no format means mp3, and files keep the names old workflows expect.
    • quality (optional, default 320k) - mp3 bit rate (or V0); ignored for wav/flac.

    No outputs - it's an output node. The result is a file at <output>/<output_path>/<filename_prefix>.<ext>.

    Install

    Shipped in the anymatix-comfy-nodes pack under the "Anymatix" category. ComfyUI Manager: search "anymatix-comfy-nodes", install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Anymatix/anymatix-comfy-nodes
    

    PyAV (av) is a declared dependency and does the encoding; Manager installs it automatically, a hand clone should pip install -r requirements.txt.

    Gotchas

    Two, both worth remembering. First, the shared pack caveat: files land in output/anymatix/results by default, and that folder gets garbage-collected on a timer (results TTL is 24h by default, ANYMATIX_CACHE_TTL_RESULTS to change it). That's fine when Anymatix is reading the result back seconds later - less fine if you treat it as long-term storage. Second, the file it writes is per-batch: each item in the audio batch gets encoded, so a multi-item batch writes several files sharing the prefix. If you expected one file and got several, that's the batch behaviour, not a bug.

    CategoryAnymatix

    Inputs (5)

    NameTypeDefaultDescription
    audioAUDIO
    output_pathSTRINGanymatix/results
    filename_prefixSTRINGaudio
    formatoptCOMBOmp34 options: mp3, wav, flac, aac
    qualityoptCOMBO320k5 options: 320k, 256k, 192k, 128k, V0

    Outputs (0)

    No outputs