Upload anytext.py
Browse files- anytext.py +1 -1
anytext.py
CHANGED
|
@@ -1100,7 +1100,7 @@ class AuxiliaryLatentModule(ModelMixin, ConfigMixin):
|
|
| 1100 |
masked_img = torch.from_numpy(masked_img.copy()).float().to(device)
|
| 1101 |
if dtype == torch.float16:
|
| 1102 |
masked_img = masked_img.half()
|
| 1103 |
-
masked_x = (retrieve_latents(self.config.vae.encode(masked_img[None, ...])) * self.vae.config.scaling_factor).detach()
|
| 1104 |
if dtype == torch.float16:
|
| 1105 |
masked_x = masked_x.half()
|
| 1106 |
text_info["masked_x"] = torch.cat([masked_x for _ in range(num_images_per_prompt)], dim=0)
|
|
|
|
| 1100 |
masked_img = torch.from_numpy(masked_img.copy()).float().to(device)
|
| 1101 |
if dtype == torch.float16:
|
| 1102 |
masked_img = masked_img.half()
|
| 1103 |
+
masked_x = (retrieve_latents(self.config.vae.encode(masked_img[None, ...])) * self.config.vae.config.scaling_factor).detach()
|
| 1104 |
if dtype == torch.float16:
|
| 1105 |
masked_x = masked_x.half()
|
| 1106 |
text_info["masked_x"] = torch.cat([masked_x for _ in range(num_images_per_prompt)], dim=0)
|