#safetensors

1 messages · Page 1 of 1 (latest)

blazing vortex
#

Other languages (like rust) struggle to load .pt or .pth models, as they are "pickled". I am relatively new to machine learning, and i am wanting to load RVC models in rust and play with them, to get familiar. I am wondering if anyone knows how to convert these models to safetensors? Internet hasn't been super useful

light steeple
blazing vortex
#

looks interesting, i just want to load the models in the c++ api of torch, so hopefully this is what i need

polar saddle
#

I tried serde-pickle it doesnt work that well for me

blazing vortex
#

but there are no examples on how to make it work with serde-pickle so i'm a bit lost haha

#

could also just run through onnx...

blazing vortex
#

well i've used the safetensors implementation for now, definitely loads the model

#

does tch-rs not read metadata?

#

i've had to use the safetensors crate directly to read the header

light steeple
#

well, safetensors by design only loads tensors

#

there is no general standard regarding the metadata

#

So yes y ou might have to do on your own

blazing vortex
#

yes luckily there is a safetensors library and i am able to read the metadata that way