Nodes/ComfyUI-UVR5/PreView Audio
ComfyUI Node

PreView Audio

An audio player right on the graph

By AIFSH·Created 2 years ago·Updated 2 years ago· 120
PreView Audio
  • audio

    PreViewAudio is the pack's "let me actually hear this" node, and it's deliberately boring: one input, zero outputs, zero processing. It takes an AUDIOPATH - like the vocal_AUDIO or bgm_AUDIO that UVR5_Node hands you - and sticks an HTML5 audio player right into the node in your graph. Click play, listen, decide.

    It exists for a simple reason: the rest of this pack deals in file paths, not waveforms. UVR5 writes stems to ComfyUI's output folder and passes you paths; PreViewAudio is how you check what actually came out without leaving the UI to browse for files.

    How it works

    It's mostly a frontend trick. The Python side barely does anything - on execution it returns the filename and its parent folder to the UI. A tiny JavaScript extension (packed in web/js/) picks that up, builds a /view URL for the file, and renders an <audio controls> widget on the node. Right-click the player and you get "Open preview" and "Save preview" options. There's also an IS_CHANGED hook that computes a SHA-256 of the whole input file, so the node re-runs (and your player refreshes) when the underlying audio actually changes.

    Two things worth knowing. First, it's an output node - which means whatever feeds it is re-executed on every run. Drop it on the end of a LoadAudioPath → UVR5_Node chain and every run triggers a fresh separation. That's the point, but it surprises people who wire a preview in just to peek. Second, the node description in the source is literally "hello world!" - the author never filled it in. Don't read anything into that.

    The one input

    • audio (AUDIOPATH) - the only field. Feed it a stem path, a LoadAudioPath result, anything that emits AUDIOPATH.

    Installing and using it

    Same as the rest of the pack - ComfyUI Manager, search "ComfyUI-UVR5", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AIFSH/ComfyUI-UVR5.git
    cd ComfyUI-UVR5
    pip install -r requirements.txt
    

    Restart and the node appears under the AIFSH_UVR5 category. Wire it like this: LoadAudioPathUVR5_NodePreViewAudio, with vocal_AUDIO on one preview node and bgm_AUDIO on another.

    Gotchas

    • The whole-file SHA-256 is slow for long audio. A multi-hour track makes every run hash the entire file before anything else happens. Keep your inputs trimmed.
    • Whether the player actually plays depends on your browser's codec support. WAV and MP3 are safe; odd formats may render a dead player. If the preview silently shows nothing, check that first.
    • It's convenience, not necessity. Since the pack writes stems to ComfyUI/output, you can always listen to them there. The node just saves you the tab-switch.

    It's a thin node - there's not a lot of depth to it, and that's fine. It's the one utility in this pack you'll tack on and forget about, which is exactly what a preview should be.

    CategoryAIFSH_UVR5

    Inputs (1)

    NameTypeDefaultDescription
    audioAUDIOPATH

    Outputs (0)

    No outputs