Nodes/Audio Batch/Audio Download and Load
ComfyUI Node

Audio Download and Load

Audio Download and Load — make a workflow run anywhere, no file hunting

By set-soft·Created about a year ago·Updated about a year ago· 8
Audio Download and Load
  • audioUI
  • audio_bypass
  • audio
base_urlhttps://huggingface.co/set-soft/audio_separation/resolve/main/Audio_Examples/
filename01-The_Symphony_of_Automation.mp3
target_sample_rate0

The most common way a shared ComfyUI workflow fails on arrival is missing input files. The workflow references a clip that lives on your drive, the person downloading it has a different input/ folder, and it errors on load. Audio Download and Load (SET_AudioDownload) was built for exactly that problem: it fetches an audio file from a URL, caches it into ComfyUI's input/ directory, and loads it - which means a workflow that includes this node carries its own audio with it. Download the workflow, run it, done.

That's why it exists, and the README is honest about it: it was added (v1.3.0) "for simpler examples," specifically so the pack's example workflows can reference three audio files that get fetched automatically instead of demanding you supply them.

Inputs

  • base_url - the URL of the directory containing the file. The default points at the author's Hugging Face repo (huggingface.co/set-soft/audio_separation/...), which is a nice touch: the same set-soft who maintains this pack also hosts the example audio.
  • filename - the file to grab, e.g. music.mp3. base_url + filename is the full download URL.
  • target_sample_rate - load the audio at this rate, or 0 for the file's original rate (resampling happens during load via torchaudio).
  • audioUI - a hidden AUDIO_UI widget, which the frontend renders as a play button so you can listen to the result right in the node.
  • audio_bypass - optional, and it's the clever part: if you connect an audio input here, it's used instead of the download. The README explains the intended trick - connect a Load Audio node to it, and as long as that node isn't muted, your local file wins; mute it, and the download kicks in. One wiring pattern switches between "my file" and "the shared default."

How it works

It checks ComfyUI's input/ directory first; if filename already exists, the download is skipped. Otherwise it downloads (using requests if available, falling back to the stdlib urllib), then loads with torchaudio.load, optionally resampling, and hands back the standard AUDIO value. Errors are loud: a failed download or a corrupt file raises and stops the workflow with a message in the UI. The output is audio, the loaded signal, and because it's an output node you'll get a player widget too.

Install & gotchas

It ships in the Audio Batch pack. ComfyUI Manager search "Audio Batch", or:

cd ComfyUI/custom_nodes/
git clone https://github.com/set-soft/ComfyUI-AudioBatch
pip install seconohe

Restart ComfyUI.

A few things to know. This node downloads from the internet - only run workflows from people you trust, and the caching means the file persists in input/ after the first fetch (delete it if you want to force a re-download). The audio_bypass behavior is easy to misread: it's not a fallback to the download on error, it's a switch based on whether the connected node is muted. And since it loads via torchaudio, exotic codecs a browser handles fine may fail here - stick to common formats like mp3 and wav. For sharing workflows, this is the one node that turns a "works on my machine" failure into a "works on everyone's machine" demo.

Categoryaudio/io

Inputs (5)

NameTypeDefaultDescription
base_urlSTRINGhttps://huggingface.co/set-soft/audio_separation/resolve/main/Audio_Examples/The base URL or directory path where the audio file is located.
filenameSTRING01-The_Symphony_of_Automation.mp3The name of the audio file to download (e.g., music.mp3, effect.wav).
target_sample_rateINT00–192000Target sample rate to load the audio at. 0 means use the file's original sample rate.
audioUIAUDIO_UI
audio_bypassoptAUDIOIf this audio is present will be used instead of the downloaded one

Outputs (1)

NameTypeDescription
audioAUDIO