π§ Save Audio (Dehypnotic)
Turn whatever audio your workflow made into an actual MP3
- audio
- audio
- format_info
Audio generation is a small corner of the ComfyUI ecosystem, but if you live there - generating music or sound effects with an audio model and its node wrapper - you eventually hit the same wall: a nice AUDIO tensor sitting in RAM and no obvious way to get an .mp3 onto disk. That's Save MP3 (Dehypnotic)'s entire job. It's a genuinely small node, and that's its appeal: six inputs, two outputs, done.
How it works
It normalizes the AUDIO input - dict, tuple, or array, with batch dims squeezed and mono/stereo handled - grabs the sample rate, builds a small WAV in memory, and hands it to an encoder. Backend lookup order matters if you've ever fought with ffmpeg on Windows: an FFMPEG_BINARY/FFMPEG_PATH env var, a drop-in ffmpeg.exe in a bin/ folder next to the node, imageio-ffmpeg's auto-downloaded static binary, then system ffmpeg. If none exist it falls back to the pure-Python lameenc. No backend at all means a clean error telling you what to install - it never silently produces an empty file.
The inputs (all of them)
- audio - the AUDIO input, mono or stereo.
- bitrate_mode -
variable(VBR),constant(CBR), oraverage(ABR). Variable is the sensible default for music and speech alike. - quality - low/medium/high. The mapping lives in the README: VBR high β 245 kbps, medium β 165, low β 100; CBR 320/192/128; ABR 256/192/160.
- file_path (default
audio), date_subfolder_pattern (default%Y-%m-%d), filename_prefix (defaultComfyUI).
One quirk versus the other nodes in this pack: filenames are timestamp-based, not sequence-numbered - prefix_YYYYMMDD_HHMMSS.mp3, de-duplicated with _2, _3 when collisions happen. Fine in practice; just don't expect _0001.
Outputs: audio (the input passed through) and bitrate_info (STRING with the full bitrate table and your selection highlighted - wire it into a text display node if you want it visible). It's an output node, so it can terminate the graph.
Install
Same pack as the other Dehypnotic save nodes. ComfyUI Manager, search "Dehypnotic Save nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/Dehypnotic/comfyui-dehypnotic-save-nodes
Restart. There's no requirements.txt, so to get a working encoder backend install either:
pip install imageio-ffmpeg
or, if you want the dependency-free pure-Python path:
pip install lameenc
Common issues
- "No MP3 backend found" - that's the missing-backend error; install one of the above. It's not a ComfyUI bug.
- A raw array with no sample rate - this node expects the standard ComfyUI AUDIO shape (dict with
samples+sample_rate). If you hand it a bare array it complains about the missing sample rate, so check what's feeding it. - External save paths - like every node in this pack, it only writes under ComfyUI's
output/unless you whitelist a root indehypnotic_save_allowed_paths.jsonor viaDEHYPNOTIC_SAVE_ALLOWED_PATHS. - Heads up: the README says this repo will be deleted; the maintained home is
Dehypnotic/ComfyUI-Dehypnotic. The class name staysSaveAudioMP3Dehypnotic, so your workflows survive the move - the display name just changes to "Save Audio (Dehypnotic)".
Honest take: you'll only reach for this if you actually generate audio, and when you do it's a five-minute node that just works. That's the whole pitch.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | β | |
| file_path | STRING | audio | β |
| date_subfolder_pattern | STRING | %Y-%m-%d | β |
| filename_prefix | STRING | ComfyUI | β |
| autoplay | COMBO | on | 2 options: on, off |
| preview_only | COMBO | off | 2 options: on, off |
| format | COMBO | mp3 | 4 options: mp3, wav, flac, opus |
| bitrate_modeopt | COMBO | variable | 3 options: variable, constant, average |
| qualityopt | COMBO | high | 3 options: low, medium, high |
| sample_rateopt | COMBO | source | 6 options: source, 16000, 22050, 44100, 48000, 96000 |
| bit_depthopt | COMBO | 16 | 2 options: 16, 24 |
| flac_compressionopt | INT | 50β8 | β |
| opus_bitrateopt | INT | 1286β510 | β |
| opus_applicationopt | COMBO | audio | 2 options: audio, voip |
| opus_vbropt | COMBO | on | 2 options: on, off |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | β |
| format_info | STRING | β |