Nodes/DiffusionGemma Prompt Builder/DiffusionGemma Project Master Contract
ComfyUI Node

DiffusionGemma Project Master Contract

The whole project, frozen into one deterministic manifest

By exportAnything·Created 2 months ago·Updated a day ago· 44
DiffusionGemma Project Master Contract
    • project_manifest_json
    • project_id
    • master_aspect_ratio
    • recommended_h3_shot_count
    • brief_sha256
    • lyrics_sha256
    • status
    • ready
    • max_h3_shot_seconds
    creative_brief
    production_duration_seconds15.0
    aspect_ratio9:16
    master_audio_sha256
    lyrics
    excerpt_start_seconds0.00
    excerpt_duration_seconds15.00
    generation_modelMiniMax H3 Ref2VA
    deliverables_json{"primary":"9:16 master","adaptations":["16:9","1:1"]}
    max_h3_shot_seconds15.0

    Once you've locked a song and you're aiming at a 15–60 second MiniMax H3 project, you stop being in "generate a clip" territory and start being in "run a production" territory. MiniMax H3 generates in bounded clips - one generation pass is 4–15 seconds - so a longer piece has to be split into multiple generation lanes. That's when consistency becomes the whole game: every lane must agree on the song, the excerpt, the aspect, the brief, and the deliverables, or you're assembling Franken-video from clips that disagree. DiffusionGemma Project Master Contract is the node that draws the box around all of it.

    It freezes the approved song (by waveform SHA-256, plus the exact excerpt window), the creative brief, the duration, the master aspect, the generation-lane budget, and your requested deliverables into one versioned JSON contract. Everything downstream - the multi-shot planner, the delivery planner, the seed fanout - reads that one manifest instead of ten loosely-synced widgets. The project_id is a hash of the whole contract, so it's deterministic: same inputs, same project, every time. That's what makes reruns and comparisons meaningful.

    The inputs you actually set

    • creative_brief - required, and non-empty is enforced. This is the creative intent that gets hashed into the contract.
    • master_audio_sha256 - required, exact 64-hex SHA-256 of the locked waveform. Wire this from the audio selector's lock output; don't type it.
    • production_duration_seconds (max 60), aspect_ratio (default 9:16), excerpt_start_seconds and excerpt_duration_seconds (the excerpt duration must match the production duration within 0.05s).
    • lyrics - optional, but it gets hashed into lyrics_sha256 so a lyric change is detectable.
    • max_h3_shot_seconds (5–15) - and here's the naming trap the tooltip warns about: the legacy name is misleading. This is the hard maximum duration of one H3 generation pass, not a limit on native [Shot N] blocks inside that pass.
    • deliverables_json - defaults to a 9:16 master with 16:9 and 1:1 adaptations listed.

    Outputs and the one thing everyone gets wrong

    Outputs are project_manifest_json, project_id, master_aspect_ratio, recommended_h3_shot_count, brief_sha256, lyrics_sha256, status, ready, and a passthrough max_h3_shot_seconds.

    The recommended_h3_shot_count is ceil(duration / max_h3_shot_seconds) - the number of duration-bounded H3 generation lanes, not the number of camera cuts. Native [Shot N] choreography stays prompt-controlled by the Director and the H3 Target Profile. The README is explicit: don't connect this count to the target profile's native shot-count control. That mismatch is the single most common conceptual error in the whole system.

    Wiring and error behavior

    Errors here are loud and early - empty brief, missing or malformed audio hash, an excerpt that doesn't match the duration, or a request needing more than four lanes all raise rather than producing a half-valid contract. Feed project_manifest_json into DiffusionGemmaAudioAwareMultiShotPlanner (the lane splitter) and DiffusionGemmaMultiFormatDeliveryPlanner (the deliverable tracker). Install via ComfyUI Manager (search "DiffusionGemma Prompt Builder") or git clone https://github.com/exportAnything/ComfyUI-DiffusionGemmaPromptBuilder into custom_nodes.

    Categoryprompt/diffusiongemma/production-planning

    Inputs (10)

    NameTypeDefaultDescription
    creative_briefSTRING
    production_duration_secondsFLOAT15.00.1–60
    aspect_ratioCOMBO9:168 options: 9:16, 16:9, 1:1, 4:3, 3:4, 3:2, +2
    master_audio_sha256STRING
    lyricsSTRING
    excerpt_start_secondsFLOAT0.00
    excerpt_duration_secondsFLOAT15.00
    generation_modelSTRINGMiniMax H3 Ref2VA
    deliverables_jsonSTRING{"primary":"9:16 master","adaptations":["16:9","1:1"]}
    max_h3_shot_secondsFLOAT15.05–15Legacy name: this is the hard maximum duration of one H3 generation pass. It does not limit native [Shot N] blocks inside that pass. If preferred native/recovery seams cannot satisfy the cap, the planner uses deterministic duration-balanced seams and carries an active source shot into the next lane.

    Outputs (9)

    NameTypeDescription
    project_manifest_jsonSTRING
    project_idSTRING
    master_aspect_ratioSTRING
    recommended_h3_shot_countINT
    brief_sha256STRING
    lyrics_sha256STRING
    statusSTRING
    readyBOOLEAN
    max_h3_shot_secondsFLOAT