XAudioSave
Loudness-normalized audio out of ComfyUI, no mastering suite required
- audio
- processed_audio
- save_path
Most audio-save nodes in ComfyUI just dump a WAV file and call it a day. That's fine until you feed that file to a platform that cares about loudness - YouTube, a podcast host, a broadcast chain - and your track comes out whisper-quiet or clipping. XAudioSave is the save node that acts like a mini mastering chain: it can resample, compress, normalize to a target LUFS, and peak-limit, then write WAV or FLAC. If your pipeline produces audio (TTS, music gen, voice cloning), this is the node that makes the output actually usable instead of "technically a file."
How it works
Under the hood it's an ffmpeg-python pipeline, which is why the pack's README hammers on FFmpeg: no FFmpeg on your system PATH, no XAudioSave. The processing order is deliberate:
- Resample to your chosen
sample_rate(default 48000 Hz). - Compress if enabled - a dynamic range compressor whose threshold is auto-calculated from the measured input loudness and your target. The presets pick the ratio: Fast (3:1, voice/podcasts), Balanced (2:1, general), Slow (1.5:1, mastering/broadcast).
use_custom_ratiooverrides the preset with a manualcustom_ratiofrom 1.0 to 20.0. - Normalize to your
target_lufsusing FFmpeg'sloudnormin a two-pass mode (it first measures, then applies) so the result lands close to the target rather than guessing. - True Peak limit if enabled - broadcast-style limiting with 8x oversampling, default ceiling -1.1 dB, which keeps the file from clipping on playback.
The output processed_audio is 32-bit float. Set target_lufs to -70 to skip normalization entirely, and set enable_peak_limiter/enable_compression off to skip those stages.
Inputs that matter
- audio - the input audio tensor.
- target_lufs (default -14.1) - the loudness you're aiming for. Lower = quieter. -14 is a good streaming default; -70 disables.
- format - WAV or FLAC. WAV keeps the float32 master but the author notes it doesn't reliably preserve custom workflow metadata; FLAC is lossless and embeds workflow metadata. FLAC is the better default.
- filename_prefix / subfolder - support the pack's datetime placeholders:
%Y% %m% %d% %H% %M% %S%. No path separators allowed in subfolder names. - enable_peak_limiter (default on) with peak_limit (-1.1 dB) - leave on unless you're doing your own limiting.
Outputs: processed_audio (the treated audio) and save_path (relative to ComfyUI's output folder).
Installing it
This is in ComfyUI-Xz3r0-Nodes, so install the pack once - ComfyUI Manager (search ComfyUI-Xz3r0-Nodes) or:
cd ComfyUI/custom_nodes
git clone https://github.com/Xz3r0-M/ComfyUI-Xz3r0-Nodes.git
cd ComfyUI-Xz3r0-Nodes
pip install -r requirements.txt
Then restart ComfyUI. The Python side pulls in ffmpeg-python from requirements.txt, but the README's warning is the one that bites people: system FFmpeg must be installed and on your PATH. On Windows that means installing FFmpeg and adding it to your environment variables, not just having it somewhere on disk.
Common issues
The classic failure is the node throwing because FFmpeg isn't found - that's the PATH problem above, and it affects XAudioSave, XVideoSave, and XDataHub's video previews. Second gotcha: compression with a wrong ratio can make speech pump or sound overprocessed, so start with enable_compression off, normalize first, and only add compression if the dynamic range is actually a problem. And if your WAV comes back without workflow metadata, that's the known WAV limitation, not a bug - switch to FLAC. One more: LUFS normalization is a loudness move, not a quality move; it won't fix a bad mix, it just makes it consistently loud.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | Input audio tensor | |
| filename_prefix | STRING | ComfyUI_%Y%-%m%-%d%_%H%-%M%-%S% | Filename prefix, supports datetime placeholders: %Y%, %m%, %d%, %H%, %M%, %S% |
| subfolder | STRING | Audio | Subfolder name (no path separators allowed), supports datetime placeholders: %Y%, %m%, %d%, %H%, %M%, %S% |
| format | COMBO | FLAC | Output file format. WAV keeps float32 master output but does not reliably preserve custom workflow metadata. FLAC uses lossless compression and supports metadata embedding. |
| sample_rate | COMBO | 48000 | Target sample rate for the output audio file |
| target_lufs | FLOAT | -14.1-70–0 | Target LUFS value for loudness normalization. Lower values make audio quieter. Default -14.1, Set to -70 to disable. |
| enable_peak_limiter | BOOLEAN | true | Enable True Peak limiting (Broadcast standard, 8x oversampling). When disabled, skips peak limiting. |
| peak_limit | FLOAT | -1.1-6–0 | Peak limiting value in dB. Only used when enable_peak_limiter is enabled. Default -1.1, Values below 0 dB prevent clipping. |
| enable_compression | BOOLEAN | false | Enable dynamic range compression using acompressor filter. When disabled, skips compression and proceeds directly to LUFS normalization. |
| compression_mode | COMBO | Balanced | Compression preset mode. Threshold is automatically calculated based on audio LUFS and target LUFS. Fast: Fast response for voice/podcasts, ratio=3:1. Balanced: Balanced for general use, ratio=2:1. Slow: Smooth for mastering/broadcast, ratio=1.5:1. |
| use_custom_ratio | BOOLEAN | false | Enable custom compression ratio to override preset value. When disabled, uses the preset's default ratio. |
| custom_ratio | FLOAT | 2.01–20 | Custom compression ratio (1.0 to 20.0). Only used when use_custom_ratio is enabled. Lower values = lighter compression, higher values = stronger compression. Set ratio to 1.0 to disable compression (pass-through mode). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| processed_audio | AUDIO | Audio after resampling, loudness normalization, and peak limiting (32-bit float format) |
| save_path | STRING | Saved file path relative to ComfyUI output directory |