mcmonkeyprojects / SwarmUI

SwarmUI (formerly StableSwarmUI), A Modular Stable Diffusion Web-User-Interface, with an emphasis on making powertools easily accessible, high performance, and extensibility.
MIT License
1.49k stars 108 forks source link

Reset All Metadata - backend malfunction until complete #276

Open brendanhoar opened 2 months ago

brendanhoar commented 2 months ago

Expected Behavior

Metadata would be rebuilt in a temporary space, and then, when finished, swapped into place in a single transaction or equivalent, leading to no interruption of queued requests.

Actual Behavior

Instead, metadata is removed before the scan finishes (perhaps before it starts), leading to interruptions or non-applied models in currently-queued requests. This is particularly problematic for libraries on slow media and/or large libraries

Steps to Reproduce

Queue up a dozen or so image requests using multiple LORAs. Press Reset All Metadata. A pop-up error may notify you of a missing model that you actually have. Back end may continue processing image request, however, some may be missing Loras.

Debug Logs

N/A

Other

This may be working as intended, but if so, it may be wise to warn the user that it should not be run during image generation and/or make the two processes mutually exclusive.

mcmonkey4eva commented 2 months ago

Yeah that's basically intended. The reset button is designed as a "something's gone wrong, tactical nuke all caches and figure things out from scratch". There should however be a blocker in place to avoid anything failing from lack of data while reloading