Nodes/DiffusionGemma Prompt Builder/DiffusionGemma Advertisement Music3 Prompt Adapter
ComfyUI Node

DiffusionGemma Advertisement Music3 Prompt Adapter

The Adapter That Hands MiniMax Music 3 a Legal, Governed Caption

By exportAnything·Created 2 months ago·Updated a day ago· 44
DiffusionGemma Advertisement Music3 Prompt Adapter
    • caption
    • tagged_lyrics
    • content_mode
    • bpm
    • generation_duration_seconds
    • ace_bpm_integer
    • status
    • ready
    soundtrack_contract_json

    DiffusionGemmaAdvertisementMusic3PromptAdapter is the narrow translation layer between the advertisement stack's governed soundtrack contract and MiniMax Music 3, the music generator this pack's ad workflow defaults to. It takes the structured soundtrack contract JSON and validates and exposes exactly two things the music model cares about - a caption and tagged lyrics - plus a few numbers downstream nodes need. Nothing about the contract is rewritten here: it's an adapter, and a deliberately honest one, because the caption that reaches Music 3 has already been through governance upstream.

    The soundtrack contract carries a content policy (Instrumental, Vocal, or Auto) and a structured Music 3 caption plus separately tagged lyrics with ACE-style [Verse]/[Chorus] section labels. This node's job is to pull the governed caption out unchanged and surface it as the caption output, expose tagged_lyrics for the lyric path, and report content_mode so you can see which policy is actually in effect. It also emits the numbers other stages need: bpm (from the contract), generation_duration_seconds (Music 3 candidates for a 30-second campaign are requested at 35 seconds so the selector gets headroom - the node reports that actual generation length), and ace_bpm_integer, an integer BPM carrier kept for the legacy ACE-Step fallback path, clamped to a sane 10–300 range and defaulting to 120 when the contract has none.

    Why does an ad workflow route its music through a prompt adapter instead of just typing a caption into the generator? Because the soundtrack is locked like everything else in this stack. The caption that leaves this node is the same caption the selector later measures, excerpts, and waveform-hash-locks, so the music that ends up in your master can be traced back to an approved contract. The adapter is the point where the contract becomes a generator input, and it refuses to invent anything - no injecting BPM, key, or theory prose, no rewriting lyrics. What the contract says is what Music 3 gets.

    For a beginner, the workflow is nearly fire-and-forget: wire soundtrack_contract_json from the soundtrack contract node, and the outputs mostly feed the audio candidate selector and downstream bookkeeping. The one output worth actually looking at is content_mode - if your campaign demands Instrumental and something upstream set it to Vocal, the adapter will faithfully report that Vocal policy, and you want to catch it here rather than after a vocal track you didn't ask for gets generated.

    The one genuinely advisory number in this stack is BPM. MiniMax Music 3's tempo is generative and the pack's own runtime test recorded a candidate at an estimated 87.89 BPM against a requested 122 - flagged as an advisory, not a failure, because H3 follows the selected waveform itself. If exact tempo is a hard requirement, the pack's guidance is to use a locked upload instead of trusting generated BPM. Install is the pack-wide route (ComfyUI Manager search "DiffusionGemma Prompt Builder", or clone into custom_nodes), with the ad workflow needing ComfyUI 0.33.1+ and the Music 3 model trio in text_encoders, diffusion_models, and vae. The adapter itself is text validation - no GPU cost.

    Categoryprompt/diffusiongemma/advertising

    Inputs (1)

    NameTypeDefaultDescription
    soundtrack_contract_jsonSTRING

    Outputs (8)

    NameTypeDescription
    captionSTRING
    tagged_lyricsSTRING
    content_modeSTRING
    bpmFLOAT
    generation_duration_secondsFLOAT
    ace_bpm_integerINT
    statusSTRING
    readyBOOLEAN