Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZr authored Jan 27, 2025
1 parent 361f3b2 commit 525caf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions egs/wenetspeech4tts/TTS/f5-tts/model/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def default(v, d):

def lens_to_mask(
t: int["b"], length: int | None = None # noqa: F722 F821
) -> bool["b n"]:
) -> bool["b n"]: # noqa: F722 F821
if not exists(length):
length = t.amax()

Expand Down Expand Up @@ -72,7 +72,7 @@ def mask_from_frac_lengths(

def maybe_masked_mean(
t: float["b n d"], mask: bool["b n"] = None # noqa: F722 F821
) -> float["b d"]:
) -> float["b d"]: # noqa: F722 F821
if not exists(mask):
return t.mean(dim=1)

Expand Down

0 comments on commit 525caf6

Please sign in to comment.