Nodes/ComfyUI In-N-Out Bucket/Output Audio Bucket
ComfyUI Node

Output Audio Bucket

Save audio to S3 and get a key back

By littleowl·Created 3 months ago·Updated 3 months ago· 2
Output Audio Bucket
  • audio
  • audio
  • key
  • manifest
audio_formatflac
quality128k
subfolder

TTS, voice cloning, music gen, sound design - plenty of ComfyUI pipelines end in an audio file, and if you're building anything that consumes those files programmatically, the last thing you want is to scrape output/ folders by filename. Output Audio Bucket saves your audio into the S3-compatible bucket and hands back a stable key plus the metadata manifest. Store the key, fetch the bytes later, from any machine that can see the bucket.

Inputs: audio (AUDIO - what you're saving), audio_format (COMBO, default flac, options flac/mp3/opus), and optional quality (default 128k, options V0/64k/96k/128k/192k/320k). The quality field only matters for the lossy formats - it's ignored for FLAC. Optional subfolder prefixes the key for organization, e.g. voiceovers/.

Outputs: audio (the input, passed through for chaining), key (STRING - the <subfolder>/<uuid> the file lives under), and manifest (BUCKET_MANIFEST).

How it works

The node mints a UUID, encodes the audio with your chosen codec (FLAC lossless, or MP3/Opus at the selected bitrate - V0 is the LAME-style variable-bitrate preset), uploads it as <key>.<ext>, and writes the <key>.json manifest recording sample rate, channels, and duration. The audio output passes through unchanged, so you can slot this node into a pipeline without rerouting the graph.

The flac default is a sensible starting point for anything you might want to reuse losslessly; switch to mp3 or opus when the destination actually needs a compact, universally-playable file. Pick opus for web-served content, mp3 for maximum compatibility with dumb players.

Why you'd reach for it

Same reason as the whole pack: round trips by key. A TTS workflow can save a voiceover and immediately feed its key to another workflow (or another machine) that composes it into a mix - no copying files into input/, no filename guessing. It also makes your bucket a searchable-by-metadata audio library, since the manifest records what each clip is.

Install

ComfyUI Manager (search In-N-Out Bucket) or:

cd ComfyUI/custom_nodes
git clone https://github.com/littleowl/ComfyUI_In-N-Out_Bucket.git
pip install -r ComfyUI_In-N-Out_Bucket/requirements.txt
cp ComfyUI_In-N-Out_Bucket/.env.example ComfyUI_In-N-Out_Bucket/.env

Restart, under buckets/audio. Dependencies: boto3 + python-dotenv; PyAV (the encoder) ships with ComfyUI. No models to download.

Troubleshooting

Failed uploads are almost always connectivity: check S3_ENDPOINT_URL, keys (or IAM role), and S3_ADDRESSING_STYLE (path for RustFS/MinIO, auto for AWS). The audio bucket is auto-created on first use. One thing to know about quality: it's silently ignored for FLAC, so don't set V0 and wonder why your FLAC is the same size - it always is. And if you're storing for later processing, prefer flac; re-encoding an mp3 later is a one-way trip into worse quality.

Categorybuckets/audio

Inputs (4)

NameTypeDefaultDescription
audioAUDIOThe audio to save.
audio_formatCOMBOflacCodec the audio is stored as.
qualityCOMBO128kBitrate/quality for mp3/opus (ignored for flac).
subfolderoptSTRINGOptional prefix to organize assets, e.g. 'voiceovers'.

Outputs (3)

NameTypeDescription
audioAUDIOThe input audio, passed through for chaining.
keySTRINGThe asset key the audio was saved under.
manifestBUCKET_MANIFESTMetadata written alongside the audio.