Skip to content

Video support: InvokeAI board albums are silently image-only #363

Description

@lstein

Follow-up from the video-support stack (#355#362). Videos work fully for directory albums; InvokeAI board albums skip them entirely, and do so silently.

Current behavior

_resolve_board_album_files (photomap/backend/routers/index.py) filters video suffixes out of the board listing:

paths = [images_dir / name for name in names if not is_video(Path(name))]

A board album containing videos therefore indexes fewer items than the InvokeAI gallery shows, with no warning. The existing "N of M listed by InvokeAI were not found on disk" notice does not fire, because the filter runs before the missing-on-disk count.

Why it was skipped rather than half-supported

Three independent blockers, only the last of which is the one-line filter:

  1. Discoveryfetch_board_image_names calls GET /api/v1/boards/{id}/image_names. There is no video awareness anywhere in invokeai_client.py. If InvokeAI exposes board videos through a separate listing, they are never enumerated at all.
  2. Path construction_resolve_board_album_files hardcodes <invokeai_root>/outputs/images/<name>. Video assets are presumably under outputs/videos/, so even a name that arrived would resolve to a nonexistent path and be counted as missing.
  3. Deletioninvokeai_client.delete_image hits DELETE /api/v1/images/i/{name}, an images endpoint. Deleting a board video through it would likely 404 or leave a dangling row in InvokeAI's database.

(3) drove the decision: indexing something the user then cannot delete through the UI is worse than not showing it.

What lifting it needs

  • Determine which InvokeAI endpoint lists board videos, and whether there is an is_intermediate / categories equivalent to the filter added in fix: board import no longer pulls InvokeAI canvas intermediates and masks #353
  • Add a fetch_board_video_names (or widen the existing fetch) accordingly
  • Make the path resolver media-aware — outputs/images/ is wrong for videos
  • Add a delete_video client call, or verify delete_image accepts video assets
  • Drop the is_video filter in _resolve_board_album_files
  • Tests in tests/backend/test_invokeai_board_index.py, which already stubs fetch_board_image_names

Each depends on facts about the InvokeAI API that can't be determined from this repo.

Smaller interim option

Make the skip visible: a "N video(s) in this board were skipped" completion warning, composed via progress_tracker.add_completion_warning (added in #360, which exists precisely so this can coexist with the missing-on-disk notice). Self-contained, no InvokeAI API knowledge required.

Not blockers

Board-album indexes live in the user data dir and the frame cache is keyed by album key in the user cache dir, so caching, serving, the play badge, the modal player and the semantic-map filter would all work unchanged once discovery and deletion are sorted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions