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

catch get_lora_checkpoints() exceptions #1

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

w-e-w
Copy link
Contributor

@w-e-w w-e-w commented Oct 17, 2023

AssertionError if is not LoRA are safetensors
TypeError ss_sd_model_name is None not all safetensors have metadat
this will cause the UI to not load

update:
draft for now, Irrc theres is a more proper way of telling apart lora version

Copy link
Collaborator

@contentis contentis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@w-e-w
Copy link
Contributor Author

w-e-w commented Oct 17, 2023

in webui using extra networks tab we allow user to manually set what the type of lora model
the information is stored beside the model under the same name but with .json extension

particularly
we do this in webui because some older models or non safetensors does not have the metadata

so the the order of retrieving the version information should be
lora_model_name.json > safetensors metadata > "unknow"

in my opinion this PR can be merged now to get TRT "working"
but a follow-up Improvement PR should be made when someone (possibly by me if I have time) to fetch the metadata in that order

undraft and request merge

example image of user defined metadata
image
image

@w-e-w w-e-w marked this pull request as ready for review October 17, 2023 14:13
@contentis
Copy link
Collaborator

This is great to know. Would you mind adding this as an issue?
Generally, LoRA support is not quite what I'd want it to be ATM. Ideally, I'd like to remove the whole export in the future and have it working "automatically".

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