fix: board import no longer pulls InvokeAI canvas intermediates and masks - #353
Merged
Merged
Conversation
…asks
fetch_board_image_names called GET /api/v1/boards/{id}/image_names with no
query parameters, and with categories/is_intermediate unset that endpoint
returns every image row on the board — including canvas region masks,
staging composites, and control images that InvokeAI's own gallery hides.
Now pass is_intermediate=false plus categories=general,user, matching the
gallery's Images tab plus user uploads. Older InvokeAI servers that predate
these query params ignore them and behave as before.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lstein
enabled auto-merge (rebase)
August 2, 2026 16:18
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.
Problem
Importing an InvokeAI board into PhotoMap also pulled in intermediate images from the canvas — region masks, staging composites, ControlNet inputs — that InvokeAI's own gallery never shows.
fetch_board_image_namescalledGET /api/v1/boards/{board_id}/image_nameswith no query parameters. On the InvokeAI side, that endpoint'scategoriesandis_intermediatefilters both default toNone, which means no filtering at all: every image row associated with the board comes back. InvokeAI's own frontend never calls it unfiltered — it always passesis_intermediate: falseand a category list (['general']for the Images tab,['control','mask','user','other']for Assets).Fix
Pass
is_intermediate=falseandcategories=general&categories=useron every board fetch. That imports finished generations plus user-uploaded images — the gallery's Images tab plus user assets — while excluding masks, control images, and canvas intermediates.Compatibility: InvokeAI servers that predate these query params ignore unknown parameters (FastAPI behavior), so they return the unfiltered list exactly as before — no version probe needed.
Note: the filter only affects future syncs. Board albums that already contain intermediates will keep them until the album is updated/reindexed.
Testing
tests/backend/test_invokeai_client.pyasserts the filter params are sent for every board request (including the"none"/Uncategorized bucket) and that cross-board deduplication is preserved. The existing board-index tests mockfetch_board_image_nameswholesale, so this covers the request-building layer they skip.pytest tests/backend/test_invokeai_client.py tests/backend/test_invokeai_board_index.py tests/backend/test_invoke_router.py— 92 passed.ruff check photomap tests— clean.🤖 Generated with Claude Code