Skip to content

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

Merged
AUTOMATIC1111 merged 7 commits intoAUTOMATIC1111:devfrom
brendanhoar:bgh-handle-metadata-issues-more-cleanly
Jun 8, 2024
Merged

QOL Items - handle metadata issues more cleanly for SD models, Loras and embeddings#15632
AUTOMATIC1111 merged 7 commits intoAUTOMATIC1111:devfrom
brendanhoar:bgh-handle-metadata-issues-more-cleanly

Conversation

@brendanhoar
Copy link
Copy Markdown
Contributor

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.

…n them

I have encountered pickled embeddings with a short byteorder file at the top-level, as well as a .data/serialization_id file.

Both load fine after allowing these files in the dataset.

I do not think it is likely adding them to the safe unpickle regular expression would be a security risk, but that's for the maintainers to decide.
@AUTOMATIC1111 AUTOMATIC1111 merged commit 6d8d272 into AUTOMATIC1111:dev Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants