LaurentMazare / diffusers-rs

An implementation of the diffusers api in Rust
Apache License 2.0
539 stars 55 forks source link

Loading of text embeddings in pt format? #59

Closed Emulator000 closed 1 year ago

Emulator000 commented 1 year ago

I was wondering on how is possible to load embeddings in pt format?

If I try to load it as Clip I get an error:

Expected Tensor but got GenericDict

Also it would be nice to support more than one external text embedding.

LaurentMazare commented 1 year ago

The .pt format is somewhat supported but with some limitations, see https://github.com/LaurentMazare/tch-rs/issues/595#issuecomment-1364108766 for some details. When it comes to loading weights, the easy ways I could see all involve pre-processing the weights in python.

LaurentMazare commented 1 year ago

Closing this, hopefully the explanations above were enough to fix the issue.