Repository navigation
Description
Is there an existing issue for this?
- I have searched the existing issues
What happened?
Summary
When a user indexes folders containing videos before installing the Semantic Search (semantic) model tier, later installing the semantic models only backfills image embeddings and image semantic scores — it never submits video_util_process_unembedded_frames or semantic_util_score_videos.
As a result, every video indexed prior to installing Semantic Search remains permanently unembedded (video_frames.isEmbedded = 0, zero rows in video_frame_embeddings, zero semantic tags in video_classes), and GET /videos/semantic-search omits all of those videos (or returns "No video frames have been embedded yet."). Even restarting the app does not fix it.
How Users Hit This
- On initial setup/AI tagging,
ensure_ai_tagging_models()(backend/app/utils/model_bootstrap.py:22-30) installs the preferred YOLO tier +facenet, not thesemantictier (siglip2_base_vision,siglip2_base_text,siglip2_base_tokenizer). - User adds/syncs a folder containing photos and videos (
post_sync_folder_sequenceinbackend/app/routes/folders.py:209-242orpost_ai_tagging_sequenceat180-199):video_util_process_untagged_videos()extracts keyframes intovideo_frames(defaultisEmbedded = 0inbackend/app/database/video_frames.py:37).video_util_process_unembedded_frames()(backend/app/utils/videos.py:1120-1124) skips embedding becauseSigLIP2_Base_Vision.onnxis not installed yet ("SigLIP2 vision model not installed; skipping frame embedding pass").
- Later, user opens Settings -> AI Models -> Available and installs the Semantic Search tier (
POST /models/setupwithtier="semantic", orPOST /models/download/siglip2_base_vision). submit_embedding_backfill_if_semantic()(backend/app/routes/models.py:40-59) runs for images only.- After backfill completes, searching via
GET /videos/semantic-search(backend/app/routes/videos.py:114-173) never finds the previously indexed videos until the user happens to trigger another folder sync or toggle AI tagging off/on.
Root Cause
In backend/app/routes/models.py:40-59:
def submit_embedding_backfill_if_semantic(
model_keys: List[str], executor: ProcessPoolExecutor
) -> None:
if any(
MODEL_REGISTRY[key].get("feature") in SEMANTIC_FEATURES for key in model_keys
):
executor.submit(semantic_util_build_label_embeddings)
executor.submit(image_util_process_unembedded_images)
executor.submit(semantic_util_score_images)
executor.submit(xmp_export_if_enabled)- Unlike
post_ai_tagging_sequence(backend/app/routes/folders.py:197-198) andpost_sync_folder_sequence(backend/app/routes/folders.py:240-241),submit_embedding_backfill_if_semantic()never submitsvideo_util_process_unembedded_frames(backend/app/utils/videos.py:1096, whose own docstring describes it as "the video counterpart ofimage_util_process_unembedded_images") orsemantic_util_score_videos(backend/app/utils/semantic_labels.py:253). - App startup in
backend/main.py:115-117submitssemantic_util_build_label_embeddings,semantic_util_score_images, andsemantic_util_score_videos, but also does not runvideo_util_process_unembedded_frames, so restarting does not recover unembedded video keyframes either.
Expected Behavior
Installing a semantic model via POST /models/setup or POST /models/download/{model_key} should backfill both photos and videos:
video_util_process_unembedded_frames(already self-gating whenSigLIP2_Base_Vision.onnxis missing)semantic_util_score_videos(already self-gating when label embeddings aren't cached yet)
(Optionally, the Semantic Search Installed info dialog in frontend/src/pages/ModelManager/AvailableTab.tsx:226-237 could also mention photos and videos rather than only photos.)
Affected Files
backend/app/routes/models.py(submit_embedding_backfill_if_semantic, lines 40-59)backend/tests/test_models.py(TestEmbeddingBackfillTrigger, lines 918-994)backend/tests/test_metadata_export_pipeline.py(lines 89-102)
Record
- I agree to follow this project's Code of Conduct
Activity
github-actions commentedon Nov 30, 2026
👋 Thanks for opening this issue! The maintainers will review it shortly. Till then, do not open any PR. This is a strict rule we like to follow around here :)
Discussions are carried on Discord.
Instead of commenting here, join the AOSSIE Discord server and go to Projects → PictoPy.
If you find this project useful, a GitHub star would be appreciated.
gitcordapp commentedon Dec 1, 2026
Link your account with Gitcord
Thanks for opening this issue, @neo0007777!
To receive Discord notifications and contributor tracking for this organization:
/link neo0007777/verify-link neo0007777)Once linked, Gitcord can notify you about assignments, mentions, and more.
— Posted by Gitcord