Skip to content

Fix(model install): wait for startup restore before imports#9239

Open
JPPhoto wants to merge 1 commit into
invoke-ai:mainfrom
JPPhoto:fix-model-install-race
Open

Fix(model install): wait for startup restore before imports#9239
JPPhoto wants to merge 1 commit into
invoke-ai:mainfrom
JPPhoto:fix-model-install-race

Conversation

@JPPhoto
Copy link
Copy Markdown
Collaborator

@JPPhoto JPPhoto commented May 27, 2026

Summary

Fixes a model install startup race where a new import could be enqueued before incomplete installs had finished restoring.

The model install service now tracks the startup restore thread with an event and waits for restore completion before accepting new imports or reporting install completion. This prevents duplicate or conflicting install work during app startup.

Updated:

  • invokeai/app/services/model_install/model_install_default.py
  • tests/app/services/model_install/test_model_install.py

Related Issues / Discussions

QA Instructions

Run pytest tests/app/services/model_install/test_model_install.py as well as all other tests.

The new test verifies that import_model() blocks while startup restore is still running, then proceeds after restore completes.

Merge Plan

No special merge handling required.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@JPPhoto JPPhoto requested a review from blessedcoolant as a code owner May 27, 2026 02:22
@JPPhoto JPPhoto added the 6.13.5 Library Updates label May 27, 2026
@JPPhoto JPPhoto requested review from dunkeroni and lstein as code owners May 27, 2026 02:22
@JPPhoto JPPhoto moved this to 6.13.5 LIBRARY UPDATES in Invoke - Community Roadmap May 27, 2026
@github-actions github-actions Bot added python PRs that change python files services PRs that change app services python-tests PRs that change python tests labels May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.13.5 Library Updates python PRs that change python files python-tests PRs that change python tests services PRs that change app services

Projects

Status: 6.13.5 LIBRARY UPDATES

Development

Successfully merging this pull request may close these issues.

1 participant