Nodes/DiffusionGemma Prompt Builder/DiffusionGemma Advertisement Relay Artifact
ComfyUI Node

DiffusionGemma Advertisement Relay Artifact

The Retained-Tail Courier That Survives Restarts and Cache Evictions

By exportAnything·Created 2 months ago·Updated a day ago· 44
DiffusionGemma Advertisement Relay Artifact
  • lane_images
  • relay_artifact_json
  • artifact_id
  • status
  • ready
advertisement_plan_json
campaign_id
completed_lane_index1
next_lane_index2
max_megapixels0.064

DiffusionGemmaAdvertisementRelayArtifact is how a multi-lane H3 campaign stays visually continuous across separate generation runs. When your 30-second ad is split into lanes and each lane is a distinct H3 job, the second lane needs to know what the first lane ended on - otherwise the performer's wardrobe, hair, and position can drift. The obvious answer is "keep the last frame in ComfyUI's memory," and that's exactly the answer this node refuses to rely on. It persists one small, hash-addressed tail to disk, so the relay survives ComfyUI restarts, cache evictions, and separate queue runs.

The mechanism is tidy. Inputs: lane_images (the finished frames of the just-completed lane), advertisement_plan_json (so it can find how many retained frames the plan assigned), campaign_id, and completed_lane_index / next_lane_index (defaults 1→2). It crops a short tail of the lane's frames, downscales to a max_megapixels budget (0.064 default, capped at 0.25 - this is deliberately a cheap continuity hint, not a high-res authority), computes a pixel hash, then writes the tensor to disk as a safetensors file whose filename and manifest embed the hashes. Out come relay_artifact_json (the address of what was stored, including file SHA-256 and persistent: true), artifact_id, and the status/ready pair. A later Relay Gate reads that artifact back in and feeds it as the Picture 4 continuity reference for the next lane.

The design discipline is worth calling out because it's the opposite of how most people would build this. The relay tail is continuity evidence only. It never becomes performer identity, never becomes product authority - the clean Pictures 1/2/3 remain authoritative on every lane, and the relay is off by default until the plan actually needs it. This is the pack applying the identity-drift lesson properly: the more authority you give to a recycled frame of generated video, the faster errors compound. So the relay is small, bounded, optional, and independently lazy.

That's also your main clue for troubleshooting. If your lane 2 looks nothing like lane 1, the first thing to check isn't the relay - it's whether the relay was even enabled and whether the artifact made it to disk. A disabled relay doesn't request upstream media at all, by design. And if relay_artifact_json says persistent: false, downstream can't address the tail and continuity will silently degrade to the clean references only. Keep the plan JSON and campaign id consistent, because the artifact is addressed by campaign and plan hashes - mismatched ids mean no handoff.

Install is pack-wide: ComfyUI Manager search "DiffusionGemma Prompt Builder", or git clone https://github.com/exportAnything/ComfyUI-DiffusionGemmaPromptBuilder into custom_nodes and restart. Running it in the real flow means queueing each H3 lane separately and letting this node + the relay gate stitch them - that's the loop the pack's runtime-proven 15-second two-lane campaign used, and disk persistence is what makes it repeatable rather than lucky. The node is light (a downscale plus a small file write); the H3 lanes around it are where the GPU time goes.

Categoryprompt/diffusiongemma/advertising

Inputs (6)

NameTypeDefaultDescription
lane_imagesIMAGE
advertisement_plan_jsonSTRING
campaign_idSTRING
completed_lane_indexINT11–3
next_lane_indexINT22–4
max_megapixelsFLOAT0.0640.01–0.25

Outputs (4)

NameTypeDescription
relay_artifact_jsonSTRING
artifact_idSTRING
statusSTRING
readyBOOLEAN