Nodes/DiffusionGemma Prompt Builder/DiffusionGemma Soundtrack Source
ComfyUI Node

DiffusionGemma Soundtrack Source

ACE-Step or your own file — one router with no cross-talk

By exportAnything·Created 2 months ago·Updated a day ago· 44
DiffusionGemma Soundtrack Source
  • generated_candidate_1
  • generated_candidate_2
  • generated_candidate_3
  • generated_candidate_4
  • uploaded_audio
  • candidate_1
  • candidate_2
  • candidate_3
  • candidate_4
  • effective_candidate_count
  • effective_expected_bpm
  • selected_lyrics
  • selected_duration_seconds
  • source_token
  • status
  • ready
source_modeGenerate with ACE-Step
uploaded_expected_bpm0.0
uploaded_lyrics
generated_candidate_count
generated_expected_bpm
generated_lyrics
generated_duration_seconds
uploaded_duration_seconds
uploaded_waveform_sha256
uploaded_status
uploaded_ready

The DiffusionGemma soundtrack pipeline can source its song two completely different ways: generate it with ACE-Step, or use a file you already own. Everything after that - decoded-audio QC, waveform hash lock, excerpt selection, H3 conditioning, final mux - is identical regardless of origin. DiffusionGemma Song Source Router is the gate that picks the origin, and its whole personality is laziness done right.

That matters more than it sounds. Music generation is slow and expensive, and the file-decoding branch is heavy in its own way. If ComfyUI evaluated both branches on every run you'd be paying for work you never asked for. So the router's inputs are marked lazy, and its logic is strict: in Upload song mode, the ACE candidate inputs are never evaluated; in Generate with ACE-Step mode, the uploaded file is never loaded. Only the active side wakes up, and both routes converge into the same outputs before the shared QC and hash-lock path. Downstream nodes can't tell - and shouldn't have to - whether the audio came from a generated candidate or your upload.

The inputs that matter

Two things you'll actually set:

  • source_mode - the toggle: Generate with ACE-Step (default) or Upload song.
  • uploaded_expected_bpm - optional. Leave 0 and the pack does signal-only tempo analysis; set it only if you already know the track's BPM and want it as a check.
  • uploaded_lyrics - optional, and the README is blunt: leave blank for Natural or Dance mode. Lyrics + lip sync requires the real sung lyrics of the uploaded track.

The optional inputs are the two branches feeding in: generated_candidate_1..4 (AUDIO lanes from the ACE side, plus its metadata) and the upload side's uploaded_audio, uploaded_duration_seconds, uploaded_waveform_sha256, uploaded_status, uploaded_ready.

Outputs

Four converged candidate_1..4 AUDIO sockets, then the useful summaries: effective_candidate_count, effective_expected_bpm, selected_lyrics, selected_duration_seconds, plus a source_token that records which origin was actually live, and status/ready for debugging.

The upload posture is deliberately different

Here's a nuance worth internalizing: generated candidates are suspect until proven usable - they can be blocked by the QC. An uploaded song gets the opposite treatment, because you've already chosen it. Measured tempo, vocal proxy, and onset readings on your file are shown but advisory - they can't reject a technically usable track you selected. What still blocks an upload is real technical failure: invalid shape, silence, clipping, artifact-like noise, or a track shorter than the requested excerpt. That asymmetry is by design.

Wire uploaded_audio from DiffusionGemmaUploadSong into the router, and the converged candidates into the selector/QC node. Install via ComfyUI Manager (search "DiffusionGemma Prompt Builder") or git clone https://github.com/exportAnything/ComfyUI-DiffusionGemmaPromptBuilder into custom_nodes. Then trust the lazy: whichever source you flip to, the other one quietly stays asleep.

Categoryprompt/diffusiongemma/audio-production

Inputs (16)

NameTypeDefaultDescription
source_modeCOMBOGenerate with ACE-StepGenerate keeps the existing ACE audition. Upload bypasses all ACE audio lanes and sends one custom song through the same QC, hash lock, excerpt, H3 conditioning, and final mux.
uploaded_expected_bpmFLOAT0.00–300Optional known BPM for the uploaded song. Leave 0 for signal-only tempo analysis.
uploaded_lyricsSTRINGOptional exact lyrics for an uploaded vocal song. Leave blank for Dance or Natural mode; Lyrics + lip sync requires real sung lyrics.
generated_candidate_countoptINT
generated_expected_bpmoptFLOAT
generated_lyricsoptSTRING
generated_duration_secondsoptFLOAT
generated_candidate_1optAUDIO
generated_candidate_2optAUDIO
generated_candidate_3optAUDIO
generated_candidate_4optAUDIO
uploaded_audiooptAUDIO
uploaded_duration_secondsoptFLOAT
uploaded_waveform_sha256optSTRING
uploaded_statusoptSTRING
uploaded_readyoptBOOLEAN

Outputs (11)

NameTypeDescription
candidate_1AUDIO
candidate_2AUDIO
candidate_3AUDIO
candidate_4AUDIO
effective_candidate_countINT
effective_expected_bpmFLOAT
selected_lyricsSTRING
selected_duration_secondsFLOAT
source_tokenSTRING
statusSTRING
readyBOOLEAN