-
I have obtained 50 or so safetensors models for stable diffusion and now i'd like to organize them based on their version (1.5 or 2.1). However I can't find any suitable APIs or any other way to open up these files. For example, https://huggingface.co/docs/safetensors/metadata_parsing shows a way to do it if i had HuggingFace URLs for the models, but I don't. I have them locally. So i just want to extract out the format. Is this possible? Surely it is possible. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Never mind, the header of the file is json so all I need to do now is reverse engineer where the length of the json is and then use it to read out the json. |
Beta Was this translation helpful? Give feedback.
-
This should get you started: https://gist.github.com/Narsil/3edeec2669a5e94e4707aa0f901d2282 |
Beta Was this translation helpful? Give feedback.
Thanks. I went the underengineered route.
sd_model_discriminator.sh
safetensormetadump: