Skip to content

Commit

Permalink
loading VAE from safetensors
Browse files Browse the repository at this point in the history
  • Loading branch information
koraypoyraz committed Dec 4, 2023
1 parent 5e1ba96 commit bbf241b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/compressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ def get_latent_mu_size(self):

def load_model(self):
self._model = (AutoencoderTiny
.from_pretrained(self.model_id, torch_dtype=self.d_type)
.from_pretrained(self.model_id,
torch_dtype=self.d_type,
use_safetensors=True)
.to(self._device))

def get_model(self):
Expand Down

0 comments on commit bbf241b

Please sign in to comment.