GV05 commited on
Commit
c503dcc
1 Parent(s): a8900a8

Update Utils.py

Browse files
Files changed (1) hide show
  1. Utils.py +2 -2
Utils.py CHANGED
@@ -25,11 +25,11 @@ class MingleModel:
25
  self.scheduler = LMSDiscreteScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear",
26
  num_train_timesteps=1000)
27
 
28
- def tokenizer(self, prompt):
29
  return self.tokenizer([prompt], padding="max_length", max_length=self.tokenizer.model_max_length, truncation=True,
30
  return_tensors="pt")
31
 
32
- def text_encoder(self, text_input):
33
  return self.text_encoder(text_input.input_ids.to(self.torch_device))[0]
34
 
35
  def latents_to_pil(self, latents):
 
25
  self.scheduler = LMSDiscreteScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear",
26
  num_train_timesteps=1000)
27
 
28
+ def do_tokenizer(self, prompt):
29
  return self.tokenizer([prompt], padding="max_length", max_length=self.tokenizer.model_max_length, truncation=True,
30
  return_tensors="pt")
31
 
32
+ def get_text_encoder(self, text_input):
33
  return self.text_encoder(text_input.input_ids.to(self.torch_device))[0]
34
 
35
  def latents_to_pil(self, latents):