Skip to content

fix: board import no longer pulls InvokeAI canvas intermediates and masks - #353

Merged
lstein merged 1 commit into
masterfrom
lstein/fix/board-import-skips-intermediates
Aug 2, 2026
Merged

fix: board import no longer pulls InvokeAI canvas intermediates and masks#353
lstein merged 1 commit into
masterfrom
lstein/fix/board-import-skips-intermediates

Conversation

@lstein

@lstein lstein commented Aug 2, 2026

Copy link
Copy Markdown
Owner

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_names called GET /api/v1/boards/{board_id}/image_names with no query parameters. On the InvokeAI side, that endpoint's categories and is_intermediate filters both default to None, 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 passes is_intermediate: false and a category list (['general'] for the Images tab, ['control','mask','user','other'] for Assets).

Fix

Pass is_intermediate=false and categories=general&categories=user on 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

  • New tests/backend/test_invokeai_client.py asserts 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 mock fetch_board_image_names wholesale, 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.
  • User-tested against a live InvokeAI instance: board import excludes region masks after the change.

🤖 Generated with Claude Code

…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
lstein enabled auto-merge (rebase) August 2, 2026 16:18
@lstein
lstein merged commit df9918c into master Aug 2, 2026
9 checks passed
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