Nodes/DiffusionGemma Prompt Builder/DiffusionGemma Upload Song
ComfyUI Node

DiffusionGemma Upload Song

Bring your own soundtrack without waking the music generator

By exportAnything·Created 2 months ago·Updated a day ago· 44
DiffusionGemma Upload Song
    • audio
    • duration_seconds
    • waveform_sha256
    • status
    • ready
    audio_file

    In the DiffusionGemma music-video system, the selected song is the final soundtrack - the pristine excerpt gets muxed onto the finished video. By default that song is authored on the spot by ACE-Step, and while ACE-Step is the closest thing the open-weights world has to Suno, its vocals and lyrics are still its weak suit (instrumentals are the genuinely compelling part). Sometimes you already own the better track. DiffusionGemma Upload Song is how you hand it in.

    The subtle engineering is in the word lazy on the box. ComfyUI validates every connected input before it runs, so a naive upload node whose branch is dormant can poison an otherwise valid ACE-Step queue with an empty file pick. This node's VALIDATE_INPUTS deliberately defers file validation until the Upload branch is actually selected - a blank uploader can never invalidate an ACE run. And its change-detection is stat-based (file size + mtime), so ComfyUI isn't SHA-reading a dormant file on every queue while still catching a swapped file.

    How it works

    It lists audio/video files from ComfyUI's input directory - use the built-in uploader or drop a file there. When the Soundtrack source is actually set to Upload song, it decodes the file through a bounded loader (the pack caps duration, channel count, and sample rate so one stray 40-minute FLAC can't wreck a run), and returns the waveform unchanged plus a waveform_sha256 digest. That hash is what the rest of the pipeline locks onto, so nobody can silently substitute a different song between audition and final mux.

    Inputs and outputs

    One input you set: audio_file, the upload/selector widget. The outputs:

    • audio - the decoded AUDIO, wired into DiffusionGemmaSongSourceRouter.uploaded_audio
    • duration_seconds, waveform_sha256 - feeding the router's metadata inputs
    • status, ready - for preview/debug

    Note that the pack's QC measures the decoded waveform again on the shared audition/QC path anyway; this node's numbers are the first honest pass, not the verdict.

    Install and gotchas

    Install via ComfyUI Manager (search "DiffusionGemma Prompt Builder") or git clone https://github.com/exportAnything/ComfyUI-DiffusionGemmaPromptBuilder into custom_nodes, then restart. This node doesn't invoke the DiffusionGemma model itself - it's the audio-branch plumbing - so you can build with it before you've committed to downloading the 26B checkpoint.

    One quirk worth knowing: even when the upload branch stays dormant, ComfyUI includes linked lazy ancestors in cache signatures. So changing a file selection here can invalidate downstream cache entries even though the file was never decoded. Annoying, but harmless - the run just recomputes. And remember, this node only hands audio to the router; the actual "ACE vs upload" decision lives on DiffusionGemmaSongSourceRouter, which decides whether the ACE candidates stay asleep while your track flows through the same QC, hash lock, and mux path.

    Categoryprompt/diffusiongemma/audio-production

    Inputs (1)

    NameTypeDefaultDescription
    audio_fileCOMBOUpload or choose a song from ComfyUI input. The file is decoded only when Soundtrack source is set to Upload song.

    Outputs (5)

    NameTypeDescription
    audioAUDIO
    duration_secondsFLOAT
    waveform_sha256STRING
    statusSTRING
    readyBOOLEAN