Add crash-recoverable image storage maintenance for moving existing images into the active image_subfolder_strategy#9165
Conversation
Findings
Open Questions
|
|
Summary of changes made after the most recent findings report and our Discord conversation:
|
99ed6fd to
56e6858
Compare
56e6858 to
86b8960
Compare
Summary
Adds crash-recoverable image storage maintenance for moving existing images into the active
image_subfolder_strategy.The feature includes:
scripts/image_storage_maintenance.py.docs/src/content/docs/features/image-storage-maintenance.mdx.Related Issues / Discussions
#8969
QA Instructions
Validated with focused backend and frontend checks.
To test manually, use a development install with a temporary InvokeAI root. Do not test this against an existing image library. You have been warned.
image_subfolder_strategy: flat.image_subfolder_strategyininvokeai.yamltodate,type, orhash.outputs/images/andoutputs/images/thumbnails/according to the configured strategy.External script path:
statusexits successfully when no job needs attention.moveis idempotent after the UI move has already completed.Recovery smoke test:
Expected behavior:
Merge Plan
No special merge sequencing expected. This adds a SQLite migration, so use the normal InvokeAI DB migration path.
Known limitation: the external script does not yet take an interprocess lock against a running InvokeAI process. Operators should run
scripts/image_storage_maintenance.pyonly while InvokeAI is stopped. The code includes a TODO to add this guard in a follow-up.An additional follow-up may also display a "busy" interface in the UI or allow chunked move operations to be safely performed in the background, synchronized with the UI.
Checklist
What's Newcopy (if doing a release after this PR)