DiffusionGemma Advertisement Reference Contract
Assigning Picture Roles So H3 Doesn't Merge Your Performer Into the Product
- reference_contract_json
- reference_manifest
- expected_subject_count
- performer_picture_count
- product_picture_tag
- continuity_picture_tag
- status
- ready
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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| slot_policy | COMBO | 2 performer + 1 product + relay | 1 options: 2 performer + 1 product + relay |
| performer_description | STRING | — | |
| product_description | STRING | — | |
| product_retention_attributes | STRING | — | |
| product_reference_kind | COMBO | product contact sheet | 2 options: single packshot, product contact sheet |
| performer_retention_attributesopt | STRING | identity, face, hair, body, wardrobe | — |
| package_copy_jsonopt | STRING | [] | — |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| reference_contract_json | STRING | — |
| reference_manifest | STRING | — |
| expected_subject_count | INT | — |
| performer_picture_count | INT | — |
| product_picture_tag | STRING | — |
| continuity_picture_tag | STRING | — |
| status | STRING | — |
| ready | BOOLEAN | — |