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
…ches/470617-1779836147/30883b334aa53bef1fcd4436ae272514940fd244
…ches/474568-1779845939/30883b334aa53bef1fcd4436ae272514940fd244
…ches/490877-1779916988/30883b334aa53bef1fcd4436ae272514940fd244
…ches/16354-1780052531/30883b334aa53bef1fcd4436ae272514940fd244
…ches/38083-1780844042/30883b334aa53bef1fcd4436ae272514940fd244
…ches/2033130-1781242544/30883b334aa53bef1fcd4436ae272514940fd244
…ches/2411-1782087107/30883b334aa53bef1fcd4436ae272514940fd244
…ches/7563-1782183112/30883b334aa53bef1fcd4436ae272514940fd244
…ches/23272-1782233863/30883b334aa53bef1fcd4436ae272514940fd244
…ches/29270-1782263884/30883b334aa53bef1fcd4436ae272514940fd244
…ches/50049-1782323385/30883b334aa53bef1fcd4436ae272514940fd244
…ches/53346-1782332848/30883b334aa53bef1fcd4436ae272514940fd244
…ches/57122-1782342202/30883b334aa53bef1fcd4436ae272514940fd244
…ches/61563-1782382852/30883b334aa53bef1fcd4436ae272514940fd244
…ches/35336-1782655603/30883b334aa53bef1fcd4436ae272514940fd244
…ches/40352-1782660613/30883b334aa53bef1fcd4436ae272514940fd244
…ches/54668-1782747678/30883b334aa53bef1fcd4436ae272514940fd244
…ches/5227-1782767977/30883b334aa53bef1fcd4436ae272514940fd244
…ches/7698-1782773292/30883b334aa53bef1fcd4436ae272514940fd244
…ches/27291-1782792448/30883b334aa53bef1fcd4436ae272514940fd244
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)