DiffusionGemma Soundtrack Source
ACE-Step or your own file — one router with no cross-talk
- 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
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) orUpload song.uploaded_expected_bpm- optional. Leave0and 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.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| source_mode | COMBO | Generate with ACE-Step | Generate 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_bpm | FLOAT | 0.00–300 | Optional known BPM for the uploaded song. Leave 0 for signal-only tempo analysis. |
| uploaded_lyrics | STRING | Optional exact lyrics for an uploaded vocal song. Leave blank for Dance or Natural mode; Lyrics + lip sync requires real sung lyrics. | |
| generated_candidate_countopt | INT | — | |
| generated_expected_bpmopt | FLOAT | — | |
| generated_lyricsopt | STRING | — | |
| generated_duration_secondsopt | FLOAT | — | |
| generated_candidate_1opt | AUDIO | — | |
| generated_candidate_2opt | AUDIO | — | |
| generated_candidate_3opt | AUDIO | — | |
| generated_candidate_4opt | AUDIO | — | |
| uploaded_audioopt | AUDIO | — | |
| uploaded_duration_secondsopt | FLOAT | — | |
| uploaded_waveform_sha256opt | STRING | — | |
| uploaded_statusopt | STRING | — | |
| uploaded_readyopt | BOOLEAN | — |
Outputs (11)
| Name | Type | Description |
|---|---|---|
| candidate_1 | AUDIO | — |
| candidate_2 | AUDIO | — |
| candidate_3 | AUDIO | — |
| candidate_4 | AUDIO | — |
| effective_candidate_count | INT | — |
| effective_expected_bpm | FLOAT | — |
| selected_lyrics | STRING | — |
| selected_duration_seconds | FLOAT | — |
| source_token | STRING | — |
| status | STRING | — |
| ready | BOOLEAN | — |