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

DiffusionGemma Advertisement Soundtrack Contract

The typed brief that turns into a MiniMax Music 3 caption plus tagged lyrics

By exportAnything·Created 2 months ago·Updated a day ago· 44
DiffusionGemma Advertisement Soundtrack Contract
    • soundtrack_contract_json
    • music3_caption
    • tagged_lyrics
    • effective_content_mode
    • expected_bpm
    • generation_duration_seconds
    • status
    • ready
    content_modeInstrumental
    genre_style
    mood
    instrumentation
    target_duration_seconds30.0
    bpm105.0
    time_signature4
    languageunknown
    lyrics
    voice_over_policyNone
    arrangement_notes
    do_not_sound_like

    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, or Auto. 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 as effective_content_mode.
    • genre_style, mood, instrumentation - the musical direction. do_not_sound_like is 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 become tagged_lyrics, with ACE-bracket-style section labels ([Verse], [Chorus]) so the generator knows song structure - not a prose blob.
    • voice_over_policy - locked to None in 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_mode and the vocal-proxy QC path rather than accepting the candidate.
    Categoryprompt/diffusiongemma/advertising

    Inputs (12)

    NameTypeDefaultDescription
    content_modeCOMBOInstrumental3 options: Instrumental, Vocal, Auto
    genre_styleSTRING
    moodSTRING
    instrumentationSTRING
    target_duration_secondsFLOAT30.00.1–60Selectable advertisement master duration. Music3 generation receives five seconds of selection headroom when the 60-second cap allows it.
    bpmFLOAT105.00–300
    time_signatureCOMBO44 options: 2, 3, 4, 6
    languageCOMBOunknown26 options: unknown, en, es, fr, de, it, +20
    lyricsSTRING
    voice_over_policyCOMBONone1 options: None
    arrangement_notesoptSTRING
    do_not_sound_likeoptSTRING

    Outputs (8)

    NameTypeDescription
    soundtrack_contract_jsonSTRING
    music3_captionSTRING
    tagged_lyricsSTRING
    effective_content_modeSTRING
    expected_bpmFLOAT
    generation_duration_secondsFLOAT
    statusSTRING
    readyBOOLEAN