ComfyUI Node

Save AudioX Audio

Save AudioX Audio writes your generated WAV — mind where it lands

By Yuan-ManX·Created about a year ago·Updated about a year ago· 12
Save AudioX Audio
  • audio
  • sample_rate
    output_wavoutput.wav

    You generate audio, you get an AUDIO tensor out of the Generate node, and now you need it on disk. That's this node: it takes the audio, peak-normalizes it, converts it to 16-bit, and writes a .wav file with torchaudio.save. It's the terminus of the AudioX chain - the output side of the pipeline that starts at LoadAudioXModel.

    The normalization step is worth knowing about because it means you get a hot, full-scale file every time. The code divides by the peak absolute value, clamps to ±1, then multiplies by 32767 and casts to int16. In practice: whatever the diffusion model spat out, you get a loud, properly mastered-ish WAV with no digital clipping. It does not preserve the model's raw dynamic range, so if you're about to remix the result with other audio, plan on doing your own gain staging after.

    Inputs

    Three inputs, all required, no outputs:

    • audio (AUDIO) - wire this from Generate's audio output. Nothing else in the pack produces this type.
    • sample_rate (SampleRate) - the rate used when writing the file. This comes from LoadAudioXModel's sample_rate output (44100 for the stock AudioX checkpoint). Get this wrong and your file plays back at the wrong speed/pitch.
    • output_wav (STRING, default "output.wav") - the filename. This is a plain filesystem path, not a ComfyUI output-folder path. The code calls torchaudio.save with it verbatim, relative to whatever ComfyUI's working directory is. If you leave the default, your file lands in the ComfyUI root directory, not output/, and every run will silently overwrite it. Give it a full path the first time out: /home/you/audio/my_clip.wav.

    Installing AudioX

    Install via ComfyUI Manager (search "ComfyUI-AudioX") or cd ComfyUI/custom_nodes && git clone https://github.com/Yuan-ManX/ComfyUI-AudioX.git, then pip install -r requirements.txt from inside the folder plus conda install -c conda-forge ffmpeg libsndfile, then restart. The requirements are heavy (pinned pandas, descript-audio-codec, laion-clap, wandb), so a managed ComfyUI environment may need a dedicated venv. The checkpoint auto-downloads on first LoadAudioXModel run.

    The one trap

    The output_wav path is the whole failure surface here. There's no filename-collision handling, no timestamp, no output-folder integration, no preview widget - and if the parent directory doesn't exist, torchaudio.save throws and your run fails at the last step. The fix is trivial: type a real absolute path. If you're scripting many generations, patch the node or run a small loop that renames the file afterward, because as shipped it will happily overwrite output.wav forever.

    Also worth knowing: this is a terminal node with no RETURN_TYPES, so nothing can chain after it. That's normal for a save node, but it means the pack has no way to preview the audio inside the graph - you'll be opening files in an external player. For an audio-first workflow that's a real ergonomic gap, but at least the node itself is dead simple and hard to break once you fix the path.

    CategoryAudioX

    Inputs (3)

    NameTypeDefaultDescription
    audioAUDIO
    sample_rateSampleRate
    output_wavSTRINGoutput.wav

    Outputs (0)

    No outputs