Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support cover images embedded in safetensors metadata #15319

Merged
merged 1 commit into from Mar 24, 2024

Conversation

catboxanon
Copy link
Collaborator

@catboxanon catboxanon commented Mar 19, 2024

Description

Closes #15317

If an external preview image is not found, this will fallback to check if any cover image is embedded in the safetensors metadata, and if so, uses that within the UI instead.

Note that items already part of the disk cache won't initially be affected by this change, as the metadata read previously excluded this data.

Checklist:

@catboxanon catboxanon changed the title Support embedded cover images in safetensors metadata Support cover images embedded in safetensors metadata Mar 19, 2024
@AUTOMATIC1111
Copy link
Owner

Can necessary information be included in the URL so that it's not needed to do this loop?

    item = None
    for page in extra_pages:
        for _, item in page.items.items():
            if str(Path(item.get('filename'))) == str(Path(filename)):
                break

ie page and item same as in get_metadata call.

@catboxanon
Copy link
Collaborator Author

Thanks for the suggestion -- done.

@AUTOMATIC1111 AUTOMATIC1111 merged commit b0b90dc into AUTOMATIC1111:dev Mar 24, 2024
3 checks passed
@catboxanon catboxanon deleted the feat/ssmd_cover_images branch March 24, 2024 18:52
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.

None yet

2 participants