Text-to-Image
Diffusers
Safetensors
tolgacangoz commited on
Commit
e2eb8e3
·
verified ·
1 Parent(s): 5c9a4c3

Upload anytext.py

Browse files
Files changed (1) hide show
  1. anytext.py +2 -2
anytext.py CHANGED
@@ -741,7 +741,7 @@ class TextEmbeddingModule(ModelMixin, ConfigMixin):
741
  @register_to_config
742
  def __init__(self, font_path, use_fp16=False, device="cpu"):
743
  super().__init__()
744
- font = ImageFont.truetype(font_path, 60)
745
 
746
  # self.use_fp16 = use_fp16
747
  # self.device = device
@@ -1275,7 +1275,7 @@ class AnyTextPipeline(
1275
  ):
1276
  super().__init__()
1277
  text_embedding_module = TextEmbeddingModule(
1278
- font_path=self.config.font_path,
1279
  use_fp16=unet.dtype == torch.float16,
1280
  )
1281
  auxiliary_latent_module = AuxiliaryLatentModule(
 
741
  @register_to_config
742
  def __init__(self, font_path, use_fp16=False, device="cpu"):
743
  super().__init__()
744
+ font = ImageFont.truetype(self.config.font_path, 60)
745
 
746
  # self.use_fp16 = use_fp16
747
  # self.device = device
 
1275
  ):
1276
  super().__init__()
1277
  text_embedding_module = TextEmbeddingModule(
1278
+ font_path=font_path,
1279
  use_fp16=unet.dtype == torch.float16,
1280
  )
1281
  auxiliary_latent_module = AuxiliaryLatentModule(