ComfyUI Node

TS Audio Loader

The audio loader with a waveform you can actually use

By AlexYez·Created 2 years ago·Updated about 20 hours ago· 12
TS Audio Loader
    • audio
    • duration
    • duration_seconds
    modeload
    source_path
    crop_start_seconds0.00
    crop_end_seconds-1.00

    Every time you want to stick audio into a ComfyUI graph - a voiceover, a music bed, a video's soundtrack for a Whisper pass - you hit the same wall: core has no decent audio loader, and the ones that exist make you edit the file in a DAW first. TS Audio Loader is the fix. It loads audio from basically any media (mp3, wav, mp4, mov - anything ffmpeg reads), shows you a real waveform, lets you crop by dragging on it, and can even record from your microphone inside the node.

    If you're doing anything with the pack's audio half - feeding TS Whisper, muxing a track into TS Animation Preview or Video Saver - this is the input side of that pipeline.

    How it works

    The node decodes through the ffmpeg binary that imageio-ffmpeg ships (that's a required dependency of the pack, so you don't need a system ffmpeg install). The waveform you see isn't a static preview: it's the actual decoded audio, and when you drag the crop handles on it, crop_start_seconds and crop_end_seconds get set to match. The decode is cropped to your selection, so downstream nodes only ever see the part you chose.

    There's a mode dropdown - load for files, and a microphone option where the node records directly. source_path is a combo that lists files from the input directory plus anything you upload. The waveform UI is shared with TS Audio Preview, so once you've learned one, you've learned both.

    The inputs and outputs that matter

    • mode - load vs microphone recording. Obvious, but the mic option is rarer than it should be in this ecosystem.
    • source_path - pick your file.
    • crop_start_seconds / crop_end_seconds - crop the clip in seconds. -1 for crop end means "full length," which is the default and a nice touch - you don't have to know the duration to load the whole file.

    Outputs are audio (a standard ComfyUI AUDIO object - {"waveform": [B,C,T], "sample_rate": int} - which every TS audio node and the ecosystem's video savers understand) and duration (the clip length in whole seconds, rounded up - handy for driving loop counts or video-length math).

    Installing it

    Part of comfyui-timesaver. Install via ComfyUI Manager (search "Timesaver") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AlexYez/comfyui-timesaver
    cd comfyui-timesaver
    python -m pip install -r requirements.txt
    

    Restart ComfyUI. imageio-ffmpeg comes with the requirements, so no separate ffmpeg step - on macOS you don't even need a system install.

    Where people get stuck

    The classic failure is "ffmpeg not found" or nodes failing to decode. That means the imageio-ffmpeg dependency is missing or its binary got cleaned away. Fix it with the same Python ComfyUI runs from:

    python -m pip install --upgrade imageio-ffmpeg
    

    On the Windows portable build, that means python_embeded\python.exe -m pip install --upgrade imageio-ffmpeg - installing into the wrong interpreter is how these dependencies silently vanish into a Python ComfyUI never sees. And if you're on a Mac, note that anything further down the audio chain (like TS Whisper) is designed to run on CPU there - that's deliberate, not a bug in your setup.

    CategoryTS/Audio

    Inputs (4)

    NameTypeDefaultDescription
    modeCOMBOloadLoad from file or use recorded microphone input.
    source_pathCOMBOChoose file to upload or select an audio/video file from the input directory.
    crop_start_secondsFLOAT0.00Crop start time in seconds.
    crop_end_secondsFLOAT-1.00Crop end time in seconds. Use -1 for full length.

    Outputs (3)

    NameTypeDescription
    audioAUDIODecoded audio clip (cropped to the selected range).
    durationINTClip length in whole seconds (rounded up).
    duration_secondsFLOATExact clip length in seconds. Use this when a frame count must match the audio; the whole-second output above is rounded up and overshoots by up to a second.