DiffusionGemma Advertisement Soundtrack Source
Three lazy soundtrack origins — Music 3, upload, or ACE — behind one gate
- music3_candidate_1
- music3_candidate_2
- music3_candidate_3
- music3_candidate_4
- uploaded_audio
- ace_candidate_1
- ace_candidate_2
- ace_candidate_3
- ace_candidate_4
- candidate_1
- candidate_2
- candidate_3
- candidate_4
- effective_candidate_count
- effective_expected_bpm
- selected_lyrics
- selected_duration_seconds
- source_policy
- status
- ready
The Advertisement soundtrack stack has one job upstream of everything else: decide where the music comes from without making that decision cost you a render. DiffusionGemma Advertisement Soundtrack Source Router is that decision point - a lazy router with three origins: MiniMax Music 3 (the default), Upload song, and Legacy ACE-Step. Only the selected source branch is ever requested; all routes converge afterward into the same candidate list, and everything that follows (audition, QC, excerpt, hash-lock, H3 conditioning, final mux) treats the winner the same regardless of origin.
"Lazy" is the important word, and it's worth understanding before you wire anything. Because only the chosen branch gets evaluated, you can keep all three source paths in one workflow without paying to load dormant models. But there's a wrinkle the README calls out explicitly: ComfyUI may validate linked lazy model selections before branch selection, which is why the combined user-editable workflow keeps the Legacy ACE-Step model files discoverable even when the saved source mode is Music 3. If you want a graph that never needs the ACE files, use the Music3-only API fixture instead.
Inputs by origin
source_mode- the single dropdown that picks the branch.- Music 3 branch:
music3_candidate_count,music3_expected_bpm,music3_lyrics,music3_duration_seconds, andmusic3_candidate_1…4AUDIO inputs from the generator. - Upload branch:
uploaded_audio,uploaded_duration_seconds,uploaded_expected_bpm,uploaded_lyrics,uploaded_waveform_sha256,uploaded_status,uploaded_ready. - ACE branch:
ace_candidate_count,ace_expected_bpm,ace_lyrics,ace_duration_seconds, andace_candidate_1…4AUDIO inputs.
Outputs collapse the three branches into one contract: candidate_1…4 (AUDIO), effective_candidate_count, effective_expected_bpm, selected_lyrics, selected_duration_seconds, source_policy, status, and ready. The source_policy output matters because downstream QC posture depends on origin: Music 3/ACE candidates face generated-candidate musical QC, while an uploaded song keeps technical-integrity gates but treats tempo/style/production-score heuristics as advisory - because you already chose the file.
When you'd use each branch
MiniMax Music 3 is the shipped default and the model the workflow was runtime-proven against on ComfyUI 0.33.1. Upload song is for when the client already has a track - a licensed song, an in-house jingle - and you need the whole pipeline (excerpt, H3 conditioning, mux) to run on a real file rather than a generation. Legacy ACE-Step keeps older music-video workflows working; its candidates go through the same selector. This is the advertisement-side cousin of the music-video flow's Soundtrack Source Router, which toggles between "Generate with ACE-Step" and "Upload song."
The v1 guardrails worth knowing
The contract's content policy (Instrumental/Vocal/Auto) is decided upstream in the Soundtrack Contract and honored here through the selected lyrics and BPM expectations. All selected sources still pass technical integrity, excerpt, provenance, and waveform-hash locking - origin buys you different QC emphasis, never a free pass. And the Music 3 caption-plus-lyrics bundle travels together, so the router never silently mixes an upload's lyrics with a generated candidate's audio.
Installing it
Part of exportAnything/ComfyUI-DiffusionGemmaPromptBuilder, under prompt/diffusiongemma/advertising:
cd ComfyUI/custom_nodes
git clone https://github.com/exportAnything/ComfyUI-DiffusionGemmaPromptBuilder
or ComfyUI Manager → DiffusionGemma Prompt Builder → restart. The router itself is logic; the model weight burden is whatever branches you actually run (Music 3 files, ACE files, or just an upload).
Common issues
- ACE validation errors while using Music 3. The combined workflow still references the ACE lazy branch, and ComfyUI can validate it before selection. Keep the ACE files present or switch to the Music3-only API fixture.
- Wrong candidate arriving at QC. Check
source_policyon the output - it tells the downstream selector which posture to use. If an upload is being judged like a generated candidate,source_modeisn't on Upload song. - Uploaded duration mismatches. The
uploaded_duration_secondsshould reflect the decoded file; a track shorter than the requested excerpt blocks downstream by design.
Inputs (24)
| Name | Type | Default | Description |
|---|---|---|---|
| source_mode | COMBO | MiniMax Music 3 | Only the selected source branch is requested. All routes converge before advertisement content-aware QC. |
| music3_candidate_countopt | INT | — | |
| music3_expected_bpmopt | FLOAT | — | |
| music3_lyricsopt | STRING | — | |
| music3_duration_secondsopt | FLOAT | — | |
| music3_candidate_1opt | AUDIO | — | |
| music3_candidate_2opt | AUDIO | — | |
| music3_candidate_3opt | AUDIO | — | |
| music3_candidate_4opt | AUDIO | — | |
| uploaded_audioopt | AUDIO | — | |
| uploaded_duration_secondsopt | FLOAT | — | |
| uploaded_expected_bpmopt | FLOAT | — | |
| uploaded_lyricsopt | STRING | — | |
| uploaded_waveform_sha256opt | STRING | — | |
| uploaded_statusopt | STRING | — | |
| uploaded_readyopt | BOOLEAN | — | |
| ace_candidate_countopt | INT | — | |
| ace_expected_bpmopt | FLOAT | — | |
| ace_lyricsopt | STRING | — | |
| ace_duration_secondsopt | FLOAT | — | |
| ace_candidate_1opt | AUDIO | — | |
| ace_candidate_2opt | AUDIO | — | |
| ace_candidate_3opt | AUDIO | — | |
| ace_candidate_4opt | AUDIO | — |
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_policy | STRING | — |
| status | STRING | — |
| ready | BOOLEAN | — |