Nodes/Dehypnotic/🧘 Save Audio (Dehypnotic)
ComfyUI Node

🧘 Save Audio (Dehypnotic)

Turn whatever audio your workflow made into an actual MP3

By DehypnoticΒ·Created about a month agoΒ·Updated 20 days agoΒ· 7
🧘 Save Audio (Dehypnotic)
  • audio
  • audio
  • format_info
β—„file_pathaudioβ–Ί
β—„date_subfolder_pattern%Y-%m-%dβ–Ί
β—„filename_prefixComfyUIβ–Ί
β—„autoplayonβ–Ί
β—„preview_onlyoffβ–Ί
β—„formatmp3β–Ί
β—„bitrate_modevariableβ–Ί
β—„qualityhighβ–Ί
β—„sample_ratesourceβ–Ί
β—„bit_depth16β–Ί
β—„flac_compression5β–Ί
β—„opus_bitrate128β–Ί
β—„opus_applicationaudioβ–Ί
β—„opus_vbronβ–Ί

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), or average (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 (default ComfyUI).

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 in dehypnotic_save_allowed_paths.json or via DEHYPNOTIC_SAVE_ALLOWED_PATHS.
  • Heads up: the README says this repo will be deleted; the maintained home is Dehypnotic/ComfyUI-Dehypnotic. The class name stays SaveAudioMP3Dehypnotic, 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.

CategoryDehypnotic/πŸ’Ύ IO

Inputs (15)

NameTypeDefaultDescription
audioAUDIOβ€”
file_pathSTRINGaudioβ€”
date_subfolder_patternSTRING%Y-%m-%dβ€”
filename_prefixSTRINGComfyUIβ€”
autoplayCOMBOon2 options: on, off
preview_onlyCOMBOoff2 options: on, off
formatCOMBOmp34 options: mp3, wav, flac, opus
bitrate_modeoptCOMBOvariable3 options: variable, constant, average
qualityoptCOMBOhigh3 options: low, medium, high
sample_rateoptCOMBOsource6 options: source, 16000, 22050, 44100, 48000, 96000
bit_depthoptCOMBO162 options: 16, 24
flac_compressionoptINT50–8β€”
opus_bitrateoptINT1286–510β€”
opus_applicationoptCOMBOaudio2 options: audio, voip
opus_vbroptCOMBOon2 options: on, off

Outputs (2)

NameTypeDescription
audioAUDIOβ€”
format_infoSTRINGβ€”