ComfyUI Node

ANDRO Load Audio

When the file is missing, you get silence — not a dead workflow

By AndreiOrehov·Created about a month ago·Updated 6 days ago· 4
ANDRO Load Audio
    • audio
    • report
    audio_file
    silence_seconds5.0
    sample_rate48000
    path_override
    resample_to_sample_ratefalse

    Stock LoadAudio refuses a filename that isn't in your input folder - and ComfyUI validates every node in a prompt before any of it runs. So a workflow that merely contains an audio branch can't run without that file, even when a switch downstream was never going to use it, and even when the branch is marked lazy. The pack measured it: a lazy branch still fails validation with HTTP 400, Prompt outputs failed validation. That single behaviour is why LTX users end up muting whole chains of nodes to get a video to run, and why one forgotten node in the chain breaks the whole run.

    Load Audio (optional) owns its validation instead of fighting it. An unknown filename doesn't kill the prompt - it becomes silence_seconds of silence and a line in the report output. The graph runs, the branch costs nothing, and nothing breaks.

    Inputs

    • audio_file - a dropdown of audio/video files found in your input folder, plus (none - silence). The crucial bit: a name that doesn't exist here - say, because the workflow came from someone else's machine - yields silence and a note, not an error.
    • silence_seconds (default 5) - how long the placeholder silence lasts when there's no file. 5 seconds is plenty for any pipeline that's going to discard it anyway.
    • sample_rate (default 48000) - the rate of the generated silence. Match it to what the audio VAE expects; 48 kHz is the safe default for LTX.
    • path_override - an absolute path for audio that lives outside the input folder. Wins over audio_file when set, which is the answer to "but my audio is on the NAS".

    Outputs

    • audio - an AUDIO tensor, same shape as stock LoadAudio produces, wired into LTXVAudioEncode or wherever your audio latent comes from. Uses the same decoder as stock (comfy_extras.nodes_audio.load), so files that work in stock work here.
    • report - a STRING that tells you exactly what happened: loaded 'your_take.wav': 5.00s, 48000 Hz, 2ch, or 'no_such_file.wav' not found - 5s of silence instead. Nothing failed; pick a file, or leave it if this branch is unused. That report line is the whole point - when the branch is unused, silence is a feature.

    The mechanic, honestly

    The node names its own audio_file widget in VALIDATE_INPUTS, which hands ComfyUI's combo check to the node, so an unknown filename passes validation and reaches execute() - where the missing-file path produces silence. It's a small, deliberate piece of plumbing, and it's the difference between "workflow runs on any machine, shared or not" and "workflow demands the author's exact file". That's what makes it worth having even outside LTX: it's the audio-side fix for the same "a graph that merely contains a branch shouldn't demand its inputs" problem the Audio Latent Switch node solves on the latent side.

    Install

    ComfyUI Manager (search "comfyui-vae-float32"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AndreiOrehov/comfyui-vae-float32
    

    Restart. No dependencies beyond stock ComfyUI. In the pack's own LTX2.5_float32_EXR.json example this is the node doing the quiet work: the workflow ships referencing your_take.wav that isn't on your disk and doesn't need to be - the run just works, and on generated audio the file isn't even read.

    One thing not to expect: this won't rescue a corrupt file. A file that exists but won't decode gets the same "could not decode - using silence" treatment, which is fine for robustness but means you'll want the report wired up if you're troubleshooting why your audio branch is quiet. Silence is a great default; it's also a great place to hide a bug.

    CategoryANDRO

    Inputs (5)

    NameTypeDefaultDescription
    audio_fileCOMBOA file from the input folder. A name that does not exist here - on another machine, say - yields silence and a note, not an error.
    silence_secondsFLOAT5.00.1–3600How long the substituted silence is when no file is selected or the file is missing. Match it to the clip you are generating - some audio-conditioned models size their latent from the audio, so silence that is too short can shorten the result.
    sample_rateINT480008000–192000Sample rate of the GENERATED SILENCE only - a real file always keeps its own rate, whatever this says, and the report states which rate was actually loaded. Set it to what the downstream audio encoder expects (48000 for LTX).
    path_overrideoptSTRINGAbsolute path, for audio that lives outside the input folder. Wins over audio_file when set.
    resample_to_sample_rateoptBOOLEANfalseResample a loaded file to the sample_rate above. Off by default because resampling is never free and most graphs do not need it - but when the downstream encoder wants one rate and the file has another, the mismatch otherwise surfaces as a confusing failure much further down the graph. The report always states both rates, whether or not this is on.

    Outputs (2)

    NameTypeDescription
    audioAUDIOThe loaded audio, or silence of the requested length if there was no file.
    reportSTRINGWhich file was loaded and its length / rate / channels - or why silence was substituted. Nothing is ever swapped for silence quietly.