Skip to content

Commit

Permalink
fix address #191
Browse files Browse the repository at this point in the history
  • Loading branch information
SWivid committed Oct 21, 2024
1 parent b899a35 commit d15ef36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion model/backbones/dit.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def __init__(self, text_num_embeds, text_dim, conv_layers=0, conv_mult=2):
self.extra_modeling = False

def forward(self, text: int["b nt"], seq_len, drop_text=False): # noqa: F722
batch, text_len = text.shape[0], text.shape[1]
text = text + 1 # use 0 as filler token. preprocess of batch pad -1, see list_str_to_idx()
text = text[:, :seq_len] # curtail if character tokens are more than the mel spec tokens
batch, text_len = text.shape[0], text.shape[1]
text = F.pad(text, (0, seq_len - text_len), value=0)

if drop_text: # cfg for text
Expand Down
2 changes: 1 addition & 1 deletion model/backbones/unett.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def __init__(self, text_num_embeds, text_dim, conv_layers=0, conv_mult=2):
self.extra_modeling = False

def forward(self, text: int["b nt"], seq_len, drop_text=False): # noqa: F722
batch, text_len = text.shape[0], text.shape[1]
text = text + 1 # use 0 as filler token. preprocess of batch pad -1, see list_str_to_idx()
text = text[:, :seq_len] # curtail if character tokens are more than the mel spec tokens
batch, text_len = text.shape[0], text.shape[1]
text = F.pad(text, (0, seq_len - text_len), value=0)

if drop_text: # cfg for text
Expand Down

0 comments on commit d15ef36

Please sign in to comment.