Spaces:
Runtime error
Runtime error
Update Utils.py
Browse files
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
|
29 |
return self.tokenizer([prompt], padding="max_length", max_length=self.tokenizer.model_max_length, truncation=True,
|
30 |
return_tensors="pt")
|
31 |
|
32 |
-
def
|
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):
|