AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
131.7k stars 25.27k forks source link

QOL Items - handle metadata issues more cleanly for SD models, Loras and embeddings #15632

Open brendanhoar opened 3 weeks ago

brendanhoar commented 3 weeks ago

Description

There is a diverse set of metadata content formatting out in the wild. When sd-webui scans all of the models at startup, sometimes it does not handle encountering unexpected metadata well. These minor changes may reduce console spam and may possibly allow more models to be loaded.

e.g. there is a small fix to the safe unpickle regular expression to allow for two additional files in the zipfile that I have encountered in several embeddings. I point that out so that the additional safety review is performed.

Additional analysis of some additional problematic files, and perhaps an additional PR to follow.

100% willing to make adjustments/resubmit as requested by maintainers. I will handle rejection well.

Checklist:

All tests passed. Some deprecation warnings were generated in the face_restorers tests.