Spaces:
Runtime error
Runtime error
Update model.py
Browse files
model.py
CHANGED
|
@@ -114,10 +114,10 @@ class Model:
|
|
| 114 |
condition_img = condition_img.resize((512,512))
|
| 115 |
W, H = condition_img.size
|
| 116 |
|
| 117 |
-
condition_img = torch.from_numpy(np.array(condition_img)).unsqueeze(0).permute(0,3,1,2).repeat(
|
| 118 |
condition_img = condition_img.to(self.device)
|
| 119 |
condition_img = 2*(condition_img/255 - 0.5)
|
| 120 |
-
prompts = [prompt] *
|
| 121 |
caption_embs, emb_masks = self.t5_model.get_text_embeddings(prompts)
|
| 122 |
|
| 123 |
print(f"processing left-padding...")
|
|
|
|
| 114 |
condition_img = condition_img.resize((512,512))
|
| 115 |
W, H = condition_img.size
|
| 116 |
|
| 117 |
+
condition_img = torch.from_numpy(np.array(condition_img)).unsqueeze(0).permute(0,3,1,2).repeat(1,1,1,1)
|
| 118 |
condition_img = condition_img.to(self.device)
|
| 119 |
condition_img = 2*(condition_img/255 - 0.5)
|
| 120 |
+
prompts = [prompt] * 1
|
| 121 |
caption_embs, emb_masks = self.t5_model.get_text_embeddings(prompts)
|
| 122 |
|
| 123 |
print(f"processing left-padding...")
|