Nodes/DiffusionGemma Prompt Builder/DiffusionGemma Advertisement Soundtrack Source
ComfyUI Node

DiffusionGemma Advertisement Soundtrack Source

Three lazy soundtrack origins — Music 3, upload, or ACE — behind one gate

By exportAnything·Created 2 months ago·Updated a day ago· 44
DiffusionGemma Advertisement Soundtrack Source
  • 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
source_modeMiniMax Music 3
music3_candidate_count
music3_expected_bpm
music3_lyrics
music3_duration_seconds
uploaded_duration_seconds
uploaded_expected_bpm
uploaded_lyrics
uploaded_waveform_sha256
uploaded_status
uploaded_ready
ace_candidate_count
ace_expected_bpm
ace_lyrics
ace_duration_seconds

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, and music3_candidate_14 AUDIO 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, and ace_candidate_14 AUDIO inputs.

Outputs collapse the three branches into one contract: candidate_14 (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_policy on the output - it tells the downstream selector which posture to use. If an upload is being judged like a generated candidate, source_mode isn't on Upload song.
  • Uploaded duration mismatches. The uploaded_duration_seconds should reflect the decoded file; a track shorter than the requested excerpt blocks downstream by design.
Categoryprompt/diffusiongemma/advertising

Inputs (24)

NameTypeDefaultDescription
source_modeCOMBOMiniMax Music 3Only the selected source branch is requested. All routes converge before advertisement content-aware QC.
music3_candidate_countoptINT
music3_expected_bpmoptFLOAT
music3_lyricsoptSTRING
music3_duration_secondsoptFLOAT
music3_candidate_1optAUDIO
music3_candidate_2optAUDIO
music3_candidate_3optAUDIO
music3_candidate_4optAUDIO
uploaded_audiooptAUDIO
uploaded_duration_secondsoptFLOAT
uploaded_expected_bpmoptFLOAT
uploaded_lyricsoptSTRING
uploaded_waveform_sha256optSTRING
uploaded_statusoptSTRING
uploaded_readyoptBOOLEAN
ace_candidate_countoptINT
ace_expected_bpmoptFLOAT
ace_lyricsoptSTRING
ace_duration_secondsoptFLOAT
ace_candidate_1optAUDIO
ace_candidate_2optAUDIO
ace_candidate_3optAUDIO
ace_candidate_4optAUDIO

Outputs (11)

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