Save Audio As Wav:
SaveAudioAsWav saves generated audio as WAV files in ComfyUI’s output directory. It writes one file for each audio item in a batch, using the audio’s sample rate and 16-bit WAV encoding. This gives you separate files that you can play, share, or edit after your workflow runs.
Save Audio As Wav Input Parameters:
audio
The audio to save. Connect an AUDIO output from an earlier node. SaveAudioAsWav reads its waveform and sample rate, then writes each item in the waveform batch as a separate WAV file. There is no default, minimum, or maximum value specified for this required input; it must be a compatible AUDIO value.
filename_prefix
The text used to name the saved files and determine their output location. The default is audio/ComfyUI, which places the files under an audio subfolder with names based on ComfyUI. The node adds a numbered counter and the .wav extension to each file. You can include %batch_num% in the prefix to insert an item’s zero-based batch number into its filename. No minimum or maximum length is specified.
Save Audio As Wav Output Parameters:
This node has no output sockets. It saves WAV files and returns file details to the interface so you can find the results; it does not pass audio to another node.
Save Audio As Wav Usage Tips:
- Connect this node at the point where you want to save audio. Because it has no output socket, it cannot feed its audio into a later node.
- Keep
audio/ComfyUIto collect saves in the default subfolder, or choose a descriptive prefix to distinguish projects and runs. - Add
%batch_num%to the prefix when saving batches and you want the batch position visible in each filename. - Check the source audio’s sample rate before saving if your editing or playback software requires a particular rate. This node uses the supplied rate; it does not resample the audio.
- Expect 16-bit WAV files. If you need another bit depth or file format, use a node designed for that export.
Save Audio As Wav Common Errors and Solutions:
Missing required input: audio
- Explanation: The node cannot save anything without an
AUDIOconnection. The exact validation message may vary. - Solution: Connect a compatible audio-producing node to
audioand run the workflow again.
KeyError: 'waveform' or KeyError: 'sample_rate'
- Explanation: The supplied audio value is missing data that this node reads to create a WAV file.
- Solution: Use a node that produces a valid
AUDIOvalue, and check any custom node that constructs or modifies the audio before it reaches SaveAudioAsWav.
PermissionError or OSError while writing the WAV file
- Explanation: ComfyUI could not write the file to the chosen output location. Permissions, available disk space, or an invalid path may be involved.
- Solution: Check that the output location is writable and has free space. If you changed
filename_prefix, try the defaultaudio/ComfyUIto rule out a prefix-related path problem.
Error from torchaudio.save when encoding audio
- Explanation: The waveform or sample rate could not be saved in the requested 16-bit WAV format. The exact message depends on the audio data and installed audio libraries.
- Solution: Check the upstream audio node for a valid waveform and sample rate. Try saving a known-working
AUDIOoutput to determine whether the issue comes from the audio data or the local audio setup.
No WAV file appears after the workflow runs
- Explanation: The node may not have executed, or the waveform batch may contain no items; the save loop creates one file per batch item.
- Solution: Confirm that this output node runs in the workflow and that the upstream node produces audio. Look in ComfyUI’s output directory and any subfolder specified by
filename_prefix.
