Repository navigation
Send videos to InvokeAI 7: Initial Video, Ref Video, Recall and Remix - #403
Merged
Merged
Conversation
InvokeAI 7 adds a video recall API (invoke-ai/InvokeAI-7#339) that mirrors the image one. The metadata drawer now offers, for any video: * Initial Video: place it in the Video panel's Initial Video slot. * Ref Video: append it to the reference videos of the selected model. and, for videos that carry an InvokeAI video generation record: * Recall / Remix: send the record's parameters with strict=true, so the panel is reset to the record; Remix uses mode=remix to keep the seed. The record is translated with a whitelist, and each value is checked against the upstream request bounds and dropped on its own, because InvokeAI refuses the whole request over one bad value. Videos InvokeAI may already have are placed by name before falling back to an upload onto the configured board, then Uncategorized. The buttons are gated on a new video_recall capability read from InvokeAI's OpenAPI schema. Also: * The auth fallback no longer turns a genuine 403 into a 401. A 403 on a token-bearing request was always retried anonymously and the token dropped; when the anonymous retry is refused with a 401, the backend is still multi-user, so the 403 is returned and the token kept. This broke the board fallback on every other click. * tests/backend/conftest.py sets PHOTOMAP_CONFIG at import time, not in a session fixture. A test module that imported a router at module level bound the cached config manager to the developer's real config file during collection, and the tests then wrote to it. A session guard now fails the run if the config path is not the temp file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
InvokeAI 7 adds a video recall API (invoke-ai/InvokeAI-7#339) that mirrors the image recall API PhotoMap already uses. This PR adds InvokeAI buttons to the metadata drawer for videos:
mode=remix,strict=true)mode=recall,strict=true)The buttons only appear when the linked InvokeAI's OpenAPI schema lists
/api/v1/recall/video/{queue_id}(the newvideo_recallcapability). Image buttons are unchanged.How it works
metadata_modules/invoke/video_recall.py):extra="forbid", and the raw record also carriesltx2_*fields PhotoMap doesn't model.model_name.POST /invokeai/video/use_media):/uploadroute instead, onto the configured board, falling back to Uncategorized.POST /invokeai/video/recall):skipped) are shown in a yellow note under the buttons.Also in this PR
invokeai_client._request_with_auth_fallback). A 403 on a request that carried a token was always retried anonymously, and the token dropped. When that anonymous retry is refused with a 401, the backend still requires login, so the 403 was a real permission refusal: it's now returned as-is and the token kept. Before this, a board the user couldn't write to broke the board fallback on every other click, showing "401 Not authenticated". This affects image uploads too.tests/backend/conftest.py).PHOTOMAP_CONFIGwas set in a session fixture, which runs after test collection. A test module that imports a router at module level would bind the cached config manager to the developer's real config file, and the tests would then write to it. This happened while developing this PR. The variable is now set when conftest is imported, and a session check fails the run if the config path isn't the temp file.Known limitations
video_recall_requestedevent ships in a follow-up PR. Until that lands, the buttons report success but the InvokeAI UI doesn't change.Test plan
uv run pytest tests: 1171 passed. The newtests/backend/test_video_recall.pycovers the translation, both routes, board and auth fallbacks, withheld media, the timeout message and the capability flag.npm test: 915 passed. New cases cover the four video modes, the skipped/warning note,success: false, and the capability class.ruff check,npm run lint,npm run format:checkvideo_recall_requested.🤖 Generated with Claude Code