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

DiffusionGemma Advertisement Reference Contract

Assigning Picture Roles So H3 Doesn't Merge Your Performer Into the Product

By exportAnything·Created 2 months ago·Updated a day ago· 44
DiffusionGemma Advertisement Reference Contract
    • reference_contract_json
    • reference_manifest
    • expected_subject_count
    • performer_picture_count
    • product_picture_tag
    • continuity_picture_tag
    • status
    • ready
    slot_policy2 performer + 1 product + relay
    performer_description
    product_description
    product_retention_attributes
    product_reference_kindproduct contact sheet
    performer_retention_attributesidentity, face, hair, body, wardrobe
    package_copy_json[]

    DiffusionGemmaAdvertisementReferenceContract solves the messiest identity problem in AI video ads without a single image passing through it. MiniMax H3 Ref2VA takes reference "Picture" slots, and if you just throw a performer shot and a product shot at it, the model has no reason to treat them differently - it can happily turn your product into a second performer or your performer's face onto the packaging. This node exists to make those roles explicit and contractual before any prompt is written.

    The mechanism is typed role assignment. The node is currently locked to one slot policy - "2 performer + 1 product + relay" - which maps H3's picture slots to: two performer pictures, one independent product/package picture, and a relay slot that only ever carries retained-tail continuity from the previous H3 lane (never identity authority). You describe the performer_description and product_description in prose, tell it what to retain via performer_retention_attributes (default: "identity, face, hair, body, wardrobe") and product_retention_attributes, and choose product_reference_kind - a single packshot or a product contact sheet. The outputs are the reference_contract_json (the authoritative document), a reference_manifest of typed <Picture N> role lines that gets fed to the H3 reference context, plus diagnostics like expected_subject_count, performer_picture_count, product_picture_tag, and continuity_picture_tag. It does all of this without natural-language "wording passwords" - the roles are structural, not vibes.

    What this is really doing is encoding a lesson the whole character-consistency field learned the hard way: separate identity references must stay separate, and mixing them in one sheet makes the model merge them. The pack enforces it harder than most: performer and product references are never merged into a single identity sheet, the product picture is never parsed as a second performer, and the relay tail is explicitly prevented from becoming a new identity source. Performer authority lives in Pictures 1 and 2, product authority in Picture 3, and those assignments persist on every H3 lane of a multi-lane campaign. If you've fought multi-character identity drift before, this is the stack's answer - authority by contract, lane after lane.

    The beginner fields are performer_description and product_description (describe who and what, precisely - H3 references are literal), plus product_reference_kind. The retention attributes are worth editing when your product has specific must-stay details - a distinctive bottle silhouette, a logo placement - because those become the exact attributes the model is told to preserve. Leave slot_policy alone; one choice means there's nothing to choose in v1.

    Watch the layering with its neighbor nodes: Reference Contract describes roles, but the actual images and their SHA-256 hashes come from DiffusionGemmaAdvertisementReferenceAssetPrep, and those two must stay in the same order or downstream hash checks and the planner's picture expectations will fail closed. Install is the pack install - ComfyUI Manager, search "DiffusionGemma Prompt Builder", or clone the repo into custom_nodes - and be aware the ad stack it feeds wants ComfyUI 0.33.1+ plus H3 model files and serious VRAM. This node itself is text-only; it just makes sure the expensive part doesn't waste your campaign on a merged identity.

    Categoryprompt/diffusiongemma/advertising

    Inputs (7)

    NameTypeDefaultDescription
    slot_policyCOMBO2 performer + 1 product + relay1 options: 2 performer + 1 product + relay
    performer_descriptionSTRING
    product_descriptionSTRING
    product_retention_attributesSTRING
    product_reference_kindCOMBOproduct contact sheet2 options: single packshot, product contact sheet
    performer_retention_attributesoptSTRINGidentity, face, hair, body, wardrobe
    package_copy_jsonoptSTRING[]

    Outputs (8)

    NameTypeDescription
    reference_contract_jsonSTRING
    reference_manifestSTRING
    expected_subject_countINT
    performer_picture_countINT
    product_picture_tagSTRING
    continuity_picture_tagSTRING
    statusSTRING
    readyBOOLEAN