Send the playblast to H3 in a video slot (#161) #172

Merged
crowmaki merged 2 commits from issue-161-video-slot into main 2026-10-11 00:18:12 +00:00
Owner

Closes #161. Part of #139.

A Take queued on a complex Shot now sends the Shot's current Playblast to H3 in a video slot.

What changed

  • Slot budget. SlotMedium gains Video, with H3's 3 video slots (VIDEO_SLOTS). A complex Shot's current Playblast is its only video candidate (key previz, label "Previz vN"). A Shot that isn't complex has none. The video list follows the same rules as the other media: default order, user edits, exclusion and over-budget. Its slot numbers produce <Video N> tags.
  • Prompt override. Slot-tag checks cover <Video N> in the same way as <Picture N> and <Audio N>. Excluding the Playblast, or unmarking the Shot complex, breaks a <Video 1> tag.
  • Workflows. h3.draft and h3.final go to v2 with changes_output: false. Their manifests name ref_videos.ref_video_{n} (3 slots). The job builder adds one VHS_LoadVideo per filled video slot, because H3's video ports take frames (IMAGE), as in the hand-tuned seed-hunter graph. The video loader is in ComfyUI-VideoHelperSuite, which the H3 workflows already need.
  • Preflight checks the node classes the job builder adds (added_class_types), so a ComfyUI without VHS_LoadVideo reports the H3 draft and final as not ready and names the pack.
  • Jobs. The Playblast is uploaded from the media folder and is not copied into the Project file. A job_upload row now names either a blob or a path in the media folder. A Take records a previz input with the previz version and its slot. "Same take, new seed" with original inputs sends the same version again. Promotion reuses the draft's latents and sends no video.
  • Provenance (ADR-0004). If a Take was sent a Playblast and its import is then undone, the version is marked deleted instead of removed. It stays in the Take's record and is hidden everywhere else. take_input.previz_version_id has a real foreign key.
  • Schema V47 rebuilds shot_slot_item, take_input and job_upload, and adds previz_version.deleted_at. Older rows survive the rebuild (migration test).
  • UI. The Slot list view gains a Video section, and its summary shows the video count.

Video section of the Slot list

Left for the sibling tickets

  • The composed prompt does not describe the Playblast yet (#164).
  • Staleness leaves the video list out on both sides, so a new Playblast does not make a Take stale yet (#165).
  • Storage rows for previz (#167).

Check by hand before merging

VHS_LoadVideo against a real ComfyUI with H3. The loader's inputs are force_rate 0, custom_width/height 0, frame_load_cap 0, skip_first_frames 0 and select_every_nth 1. FakeComfy accepts any inputs, so the tests cannot confirm this node signature for the installed VideoHelperSuite version.

Tests

  • cargo test --workspace --features studio-core/test-support: 989 passed.
  • bun test src scripts: 319 passed.
  • bun run check: clean.
  • New tests:
    • tests/previz.rs: video Slot list, <Video N> tags, FakeComfy upload and wiring, a Shot that isn't complex, an excluded Playblast, Promotion, reroll with original inputs, and undo after a Take was sent.
    • tests/shipped_workflows.rs: the video bindings and the node pack.
    • tests/comfyui_preflight.rs: a missing video loader.
    • tests/migrations.rs: V47.
    • A wiring unit test in workflows.rs.
Closes #161. Part of #139. A Take queued on a complex Shot now sends the Shot's current Playblast to H3 in a video slot. ## What changed - **Slot budget.** `SlotMedium` gains `Video`, with H3's 3 video slots (`VIDEO_SLOTS`). A complex Shot's current Playblast is its only video candidate (key `previz`, label "Previz vN"). A Shot that isn't complex has none. The video list follows the same rules as the other media: default order, user edits, exclusion and over-budget. Its slot numbers produce `<Video N>` tags. - **Prompt override.** Slot-tag checks cover `<Video N>` in the same way as `<Picture N>` and `<Audio N>`. Excluding the Playblast, or unmarking the Shot complex, breaks a `<Video 1>` tag. - **Workflows.** `h3.draft` and `h3.final` go to v2 with `changes_output: false`. Their manifests name `ref_videos.ref_video_{n}` (3 slots). The job builder adds one `VHS_LoadVideo` per filled video slot, because H3's video ports take frames (IMAGE), as in the hand-tuned seed-hunter graph. The video loader is in ComfyUI-VideoHelperSuite, which the H3 workflows already need. - **Preflight** checks the node classes the job builder adds (`added_class_types`), so a ComfyUI without `VHS_LoadVideo` reports the H3 draft and final as not ready and names the pack. - **Jobs.** The Playblast is uploaded from the media folder and is not copied into the Project file. A `job_upload` row now names either a blob or a path in the media folder. A Take records a `previz` input with the previz version and its slot. "Same take, new seed" with original inputs sends the same version again. Promotion reuses the draft's latents and sends no video. - **Provenance (ADR-0004).** If a Take was sent a Playblast and its import is then undone, the version is marked deleted instead of removed. It stays in the Take's record and is hidden everywhere else. `take_input.previz_version_id` has a real foreign key. - **Schema V47** rebuilds `shot_slot_item`, `take_input` and `job_upload`, and adds `previz_version.deleted_at`. Older rows survive the rebuild (migration test). - **UI.** The Slot list view gains a Video section, and its summary shows the video count. ![Video section of the Slot list](https://git.crowmaki.me/attachments/e2f2e964-e85c-4e6d-87ad-c50c8b02ad37) ## Left for the sibling tickets - The composed prompt does not describe the Playblast yet (#164). - Staleness leaves the video list out on both sides, so a new Playblast does not make a Take stale yet (#165). - Storage rows for previz (#167). ## Check by hand before merging `VHS_LoadVideo` against a real ComfyUI with H3. The loader's inputs are `force_rate 0`, `custom_width/height 0`, `frame_load_cap 0`, `skip_first_frames 0` and `select_every_nth 1`. FakeComfy accepts any inputs, so the tests cannot confirm this node signature for the installed VideoHelperSuite version. ## Tests - `cargo test --workspace --features studio-core/test-support`: 989 passed. - `bun test src scripts`: 319 passed. - `bun run check`: clean. - New tests: - `tests/previz.rs`: video Slot list, `<Video N>` tags, FakeComfy upload and wiring, a Shot that isn't complex, an excluded Playblast, Promotion, reroll with original inputs, and undo after a Take was sent. - `tests/shipped_workflows.rs`: the video bindings and the node pack. - `tests/comfyui_preflight.rs`: a missing video loader. - `tests/migrations.rs`: V47. - A wiring unit test in `workflows.rs`.
The Slot budget gains H3's 3 video slots. A complex Shot's current
Playblast is its one video candidate, keyed `previz`; a Shot that is
not complex has none. It follows the Slot list rules like the other
media: default order, edits, exclusion, over-budget, and `<Video N>`
numbering, which prompt-override tag checks now cover.

h3.draft and h3.final (v2, changes_output false) name the video ports,
and the job builder adds one VHS_LoadVideo per filled slot. The
Playblast is uploaded from the media folder rather than copied into
the Project file: job_upload rows name a blob or a media path. Takes
record the previz version and slot they were sent, so rolling with
original inputs resends the same version. Promotion reuses the draft's
latents and sends no video. Preflight checks the loader the job builder
adds, and the Slot list view has a Video section.

Co-Authored-By: Claude <noreply@anthropic.com>
Undoing a Playblast's import no longer deletes a version a Take was
sent: it is marked deleted and hidden everywhere but the Take's record
(ADR-0004), so its file stays recorded rather than an orphan, a waiting
job can still upload it, and a later import takes the next number.
take_input.previz_version_id now has a foreign key. A reference whose
bytes are gone names its medium and slot.

Co-Authored-By: Claude <noreply@anthropic.com>
crowmaki deleted branch issue-161-video-slot 2026-10-11 00:18:12 +00:00
Sign in to join this conversation.
No description provided.