DiffusionGemma Advertisement Soundtrack Contract
The typed brief that turns into a MiniMax Music 3 caption plus tagged lyrics
- soundtrack_contract_json
- music3_caption
- tagged_lyrics
- effective_content_mode
- expected_bpm
- generation_duration_seconds
- status
- ready
An ad soundtrack is not a "make it upbeat" prompt. It's a contract: instrumental or vocal, genre, mood, instrumentation, tempo, key-signature feel, language, and exactly how long the generated candidate must be so there's headroom to select a clean 30-second excerpt. DiffusionGemma Advertisement Soundtrack Contract is where you type all of that into one structured brief - and it's the node that translates your answers into the two things the music generator actually needs: a MiniMax Music 3 caption and separately tagged lyrics.
It sits at the top of the Advertisement soundtrack stack, upstream of the source router and the audio candidate selector. Unlike the older music-video flow's free-form guidance, this is a typed commercial contract: the fields are structured, the output is structured, and downstream QC knows what content policy you committed to.
Inputs that matter
content_mode-Instrumental,Vocal, orAuto. This is the contract's spine. An instrumental generated candidate doesn't need a vocal-proxy check; a vocal candidate does. Auto leaves the determination to the model. The node reports the resolved choice aseffective_content_mode.genre_style,mood,instrumentation- the musical direction.do_not_sound_likeis the field people forget: an explicit list of what this ad must not evoke.target_duration_seconds- default 30, the ad master duration. Here's the headroom logic: Music 3 generation receives five seconds of selection headroom when the 60-second cap allows it, so a 30s campaign requests a 35s candidate, giving the selector room to find a clean excerpt.bpm(default 105),time_signature(2/3/4/6),language(26 options) - the tempo/meter/language contract.lyrics- your authored words. In the output they becometagged_lyrics, with ACE-bracket-style section labels ([Verse],[Chorus]) so the generator knows song structure - not a prose blob.voice_over_policy- locked toNonein this v1 contract; the mixer supports VO later, but the shipped workflow keeps VO disabled until a real upload/loader path exists.arrangement_notes- anything else structural.
Outputs: soundtrack_contract_json (the typed contract everything downstream validates against), music3_caption (the structured MiniMax Music 3 caption), tagged_lyrics, effective_content_mode, expected_bpm, generation_duration_seconds, status, and ready.
How it keeps the rest of the stack honest
The caption and lyrics outputs feed the Music 3 prompt adapter and generation. Because the contract is typed and hash-lockable, the audio candidate selector can judge the generated candidate against this contract's content policy and BPM expectations rather than guessing what you wanted. The README also pins an important separation: an explicitly requested genre/subgenre/era is authoritative over the image's visual setting - scene evidence shapes visual lanes and lyrical imagery, but it doesn't turn a requested genre into EDM on a whim. The ad system is additive and versioned so these commercial rules never leak into the general Director or the known-good music-video V6 workflow.
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 contract node is pure structured text. To actually hear music you need the MiniMax Music 3 models from the README (minimax_music3_text_encoder_pruned_int8_convrot.safetensors, minimax_music3_dit_fp16.safetensors, minimax_music3_dav.safetensors) plus ComfyUI ≥0.33.1 for that workflow.
Common issues
- Generated track ignores your genre request. If you asked for jazz and the image setting screamed "nightclub," the visual evidence may have shaped the lanes - but a requested genre is authoritative per the contract. Check the contract fields actually reached the caption and that nothing overwrote
genre_style. - Tempo drift. MiniMax Music 3 tempo is generative; the README's own runtime-proven candidate measured ~87.9 BPM against a requested 122 and recorded an advisory. If exact BPM is a legal or creative requirement, lock an upload or use a stricter candidate policy.
- Vocal content that doesn't match the contract. Instrumental mode shouldn't ship vocals - if it does, check
effective_content_modeand the vocal-proxy QC path rather than accepting the candidate.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| content_mode | COMBO | Instrumental | 3 options: Instrumental, Vocal, Auto |
| genre_style | STRING | — | |
| mood | STRING | — | |
| instrumentation | STRING | — | |
| target_duration_seconds | FLOAT | 30.00.1–60 | Selectable advertisement master duration. Music3 generation receives five seconds of selection headroom when the 60-second cap allows it. |
| bpm | FLOAT | 105.00–300 | — |
| time_signature | COMBO | 4 | 4 options: 2, 3, 4, 6 |
| language | COMBO | unknown | 26 options: unknown, en, es, fr, de, it, +20 |
| lyrics | STRING | — | |
| voice_over_policy | COMBO | None | 1 options: None |
| arrangement_notesopt | STRING | — | |
| do_not_sound_likeopt | STRING | — |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| soundtrack_contract_json | STRING | — |
| music3_caption | STRING | — |
| tagged_lyrics | STRING | — |
| effective_content_mode | STRING | — |
| expected_bpm | FLOAT | — |
| generation_duration_seconds | FLOAT | — |
| status | STRING | — |
| ready | BOOLEAN | — |