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

Add SafeTensors support #2272

Merged
merged 4 commits into from
Oct 16, 2023
Merged

Add SafeTensors support #2272

merged 4 commits into from
Oct 16, 2023

Conversation

joeyballentine
Copy link
Member

@joeyballentine joeyballentine commented Oct 16, 2023

Adds support for Huggingface's SafeTensors format, for both model loading and saving.

In order to properly support this, I had to slightly adjust the way I detect ESRGAN and Compact params, since it assumed a certain key order not guaranteed by safetensors (it swaps the positions of weights and biases so biases come first -- perhaps because of alphabetical sorting?)

Anyway, it seems to work well. We should probably consider hosting safetensors formats of models on OpenModelDB

@joeyballentine joeyballentine merged commit d12a944 into main Oct 16, 2023
14 checks passed
@joeyballentine joeyballentine deleted the safetensors branch October 16, 2023 13:05
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