Skip to content

Index InvokeAI board videos alongside board images - #369

Open
lstein wants to merge 2 commits into
masterfrom
lstein/feature/invokeai-board-videos
Open

Index InvokeAI board videos alongside board images#369
lstein wants to merge 2 commits into
masterfrom
lstein/feature/invokeai-board-videos

Conversation

@lstein

@lstein lstein commented Aug 18, 2026

Copy link
Copy Markdown
Owner

An InvokeAI board holds videos next to its images and its gallery shows both, so a board-backed album now indexes both. This removes the board-video restriction added in #361, which skipped them explicitly pending a verified delete path.

What changed

InvokeAI client

  • fetch_board_video_names() lists a board's videos. Videos are a separate resource over there: their own router, the board passed as a query parameter rather than a path segment, and a VideoNamesResult object instead of the bare array the images endpoint returns. The same is_intermediate=false + categories=general,user filtering as images applies, and it matters — a Wan pipeline writes its intermediate clips to the board too (a real board listed 52 unfiltered vs 48 filtered).
  • A backend predating the video API 404s the whole router, which reads as "no videos here" rather than a failed index run, so board albums on an older InvokeAI keep indexing their images.
  • delete_video() routes deletions to the video endpoint. It also checks failed_videos, because that endpoint can report a failure inside a 200 — accepting it would drop the local index row while the video stayed on the board, and the video would reappear on the next re-index.

Board albums

  • Both output directories are derived now (outputs/images and outputs/videos). image_paths is what gates file access and relative-path resolution, so a board video would otherwise index but be refused at playback. The paths are recomputed on every construction, which is how albums written before this pick up the videos directory with no migration step.
  • Deletions dispatch on suffix: sending a video name to the images endpoint just 404s, which the client reads as "already gone" and swallows.
  • The missing-on-disk discrepancy warning and the "board is empty" error now count both media types.

Verification

Backend 679 passed, frontend 578 passed, ruff clean.

Verified end-to-end against a live InvokeAI: 48 videos + 2 images resolved off a real board, through the auth fallback, with frame extraction and probe facts intact.

Note on the merge commit

Master's video work (#358#362) landed while this was open. embeddings.py took master's side wholesale — its video indexing is a superset of what this branch had grown independently — and _resolve_board_album_files kept this branch's. Details are in the merge commit message. Since PRs here are squash-merged, the merge commit disappears on landing.

🤖 Generated with Claude Code

lstein and others added 2 commits August 17, 2026 22:07
An InvokeAI board holds videos next to its images and its gallery shows
both, so a board-backed album now indexes both.

* ``fetch_board_video_names`` lists a board's videos. Videos are a
  separate resource over there: their own router, the board passed as a
  query parameter rather than a path segment, and a ``VideoNamesResult``
  object instead of a bare array. A backend predating the video API 404s
  the whole router, which reads as "no videos here" so those albums keep
  indexing their images.
* ``delete_video`` routes video deletions to the video endpoint. It also
  checks ``failed_videos``, because that endpoint can report a failure
  inside a 200 — accepting it would drop the local index row while the
  video stayed on the board.
* Board albums derive both output directories now. ``image_paths`` is
  what gates file access and relative-path resolution, so a board video
  would otherwise index but be refused at playback. The paths are
  recomputed on every construction, which is how albums written before
  this pick up the videos directory with no migration.
* The indexing pipeline itself learned videos: a video is loaded as the
  still frame ffmpeg extracts near its start and then flows through the
  encoder exactly like a photo, with the probe facts riding along in the
  per-image metadata. The scan gate skips the pixel probe for videos,
  which has no header to read and would otherwise reject every clip
  small enough to reach it.

Collecting videos is opt-in per album (``Embeddings.index_videos``) and
only board albums set it: turning it on for a directory album re-scans it
for a whole new media type and makes indexing depend on ffmpeg, which is
a separate call to make.

Verified end-to-end against a live InvokeAI: 48 videos + 2 images
resolved off a real board, with frame extraction and probe facts intact.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Master grew its own video support while this branch was open (#358#362:
badge, modal player, guards, indexing, semantic-map filter). Conflict
resolution:

* ``embeddings.py`` — took master's wholesale. Its video indexing is a
  superset of this branch's: same still-frame-as-the-image approach, plus
  priming the per-album frame cache at index time, invalidating
  scan-reject entries written while videos still went through the pixel
  gate, and pruning stale stills. ``Embeddings.index_videos`` and
  ``scan_extensions`` are gone with it — master collects videos for every
  album, so there is nothing left to opt into.
* ``_resolve_board_album_files`` — kept this branch's. Master had added a
  filter that skipped board videos explicitly, because board deletion
  routed through ``delete_image`` and had not been verified against them.
  That is precisely what this branch fixes: videos are deleted through
  ``delete_video``, verified against a live InvokeAI.
* Both ``Embeddings(...)`` call sites take master's ``album_key=``.

Also dropped the docs note claiming videos were board-album-only, which
master's directory-album indexing makes false.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant