ComfyUI Node

Load Audio+

A LoadAudio that swallows video files and hands you file stats

By FranckyB·Created 5 months ago·Updated 2 days ago· 11
Load Audio+
    • audio
    • duration
    source_folderinput
    audio
    in_point0.00
    out_point0.00

    ComfyUI's built-in LoadAudio is fine until it isn't. It loads audio files, full stop. LoadAudioPlus is the same idea with the edges filed off: it also rips the audio track out of a video file, it can cap the duration while loading, and it emits an audio_info wire full of file metadata. The audio output is the standard ComfyUI AUDIO format, so it drops into existing audio workflows without changing a thing downstream.

    It lives in drmbt/comfyui-dreambait-nodes, right next to the pack's MusicGen generator and its loudness-normalizing node. If you're building any kind of audio pipeline - music generation, audio-conditioned video, sound design - this is the front door.

    Inputs

    Only two, both required:

    • audio - a dropdown of every audio and video file in your input folder, plus the usual upload widget so you can drop a file in without touching the filesystem.
    • duration_cap (FLOAT, default 0) - 0 means "load it all." Set it to, say, 8.0 and the waveform gets truncated to the first 8 seconds. Handy when you're feeding a clip into something with a fixed window and you don't want to think about trimming later.

    Outputs

    • audio (AUDIO) - the standard ComfyUI audio dict, a waveform plus sample_rate. Wires straight into audio preview and save nodes, or into the same pack's MusicGen and NormalizeAudio.
    • audio_info (AUDIOINFO) - the bonus. Sample rate, channel count, duration in seconds, sample count, and the original file path, name, and extension, plus the raw waveform. The pack's companion "Audio Info Plus + 🎵" node unpacks this into individual number outputs - handy when you want the duration driving other logic in the graph.

    How it works

    For a plain audio file it's torchaudio under the hood, and the code handles the newer torchaudio 2.9+ codec path rather than assuming an old backend. For video extensions (.mp4, .mov, .avi, .mkv, .webm) it switches to moviepy, opens the video, and pulls its audio track into a waveform. If the video has no audio track at all, it raises a clear error instead of silently handing you silence. It also normalizes the waveform if the peak exceeds 1.0, so your levels don't clip downstream.

    Gotchas

    • It's a video → audio ripper, not a transcoder. You still get a waveform, not a video with the audio attached.
    • The pack's dependency tax. This is a grab-bag pack, so installing it drags in heavy audio deps - torchaudio, librosa, pyloudnorm, moviepy - even if all you wanted was a dropdown with a duration cap. That's the cost of the whole pack, not of this node specifically.
    • Uploads land in ComfyUI's input/ folder like any other load node, and IS_CHANGED hashes the file so cached workflows correctly invalidate when you swap the audio.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/drmbt/comfyui-dreambait-nodes
    

    Restart ComfyUI afterward, or find comfyui-dreambait-nodes in ComfyUI Manager's search and let it handle the install and dependency resolution. Expect the first install to take a while.

    If you've ever wanted to skip the "extract audio from that clip in a separate tool" step, this is the node that removes it. Same output format as stock ComfyUI, plus video input and a metadata wire you didn't have before.

    CategoryFBnodes

    Inputs (4)

    NameTypeDefaultDescription
    source_folderCOMBOinputBrowse files from the input or output folder
    audioCOMBOAudio file to load
    in_pointFLOAT0.00Clip start in seconds
    out_pointFLOAT0.00Clip end in seconds (0 = full length)

    Outputs (2)

    NameTypeDescription
    audioAUDIO
    durationFLOAT