ComfyUI Node

Audio Loader

Where every MBM music video starts

By Sorcerio·Created 2 years ago·Updated 2 years ago· 32
Audio Loader
    • AUDIO
    • FILENAME
    filepath

    MBM's Music Visualizer is a ComfyUI pack that turns audio into a sequence of generated images, and this node is where the whole thing starts. The Audio Loader hands a music file to the librosa audio-analysis library and hands you back the AUDIO object that every other node in the pack is waiting for. No calculator input, no renderer, no feature extraction - nothing downstream runs until this has loaded something real. It's the simplest node in the pack and also the one with the least forgiving setup quirk.

    The thing that trips everyone up first: this loader does not read from ComfyUI's usual input folder. It reads from the pack's own audio/ directory - custom_nodes/MBM-Music-Visualizer/audio/ - and the filepath dropdown is generated from whatever it finds there. The repo ships that folder with nothing but a placeholder text file, so on a fresh install the dropdown is empty. Drop your files in and then refresh the ComfyUI page; the README calls this out explicitly, because the file list is only rebuilt when the node (re)loads. Supported extensions are wav, mp3, ogg, and flac.

    What you actually get. One input, two outputs. The single input is the filepath dropdown - that's it. The AUDIO output is a (waveform, sample_rate) tuple straight out of librosa.load(): a numpy array of samples plus the sample rate in Hz. The FILENAME output is the file's basename with the extension stripped - handy if you want to label saved outputs with the song name.

    Where it fits in the flow. Wire AUDIO into the Audio Feature Calculator's audio input. That's the canonical path from the pack's example workflow (assets/ExampleMusicVisualizer.json - drag it into ComfyUI and you get the full dog/cat/crocodile demo wired end to end). The calculator turns that waveform into per-frame "feature modifiers," which eventually drive how hard the renderer mutates the latent on each frame.

    One thing to know before you blame this node: the AUDIO type is pack-local. It's just a Python tuple annotated as tuple[ndarray, float], so it will happily plug into MBM's own nodes but won't necessarily connect to another pack's audio nodes that expect their own custom audio type. That's normal for custom-node land, but it's worth knowing before you try to swap this pack's audio path out for something else.

    Install is the same for every node in this pack: cd ComfyUI/custom_nodes && git clone https://github.com/Sorcerio/MBM-Music-Visualizer.git MBM_MusicVisualizer, then pip install -r MBM_MusicVisualizer/requirements.txt from your ComfyUI venv (that installs librosa~=0.10.1, which drags in numba, scipy, and matplotlib - it's the pack's one real dependency and it's a chunky one). ComfyUI Manager may also find it if you search "MBM" or "Music Visualizer". Restart ComfyUI and the nodes appear under the MBMnodes submenu.

    Beyond the empty-dropdown surprise, there's not much to troubleshoot here: no audio/ folder, no files, wrong file type, or forgot to refresh are the whole list. Once a filename shows up in that dropdown, you've cleared the hardest part of this pack.

    CategoryMBMnodes/Audio

    Inputs (1)

    NameTypeDefaultDescription
    filepathCOMBO0 options:

    Outputs (2)

    NameTypeDescription
    AUDIOAUDIO
    FILENAMESTRING