From 525caf624cbcd37353e74f6de52b4074c0d6c4e7 Mon Sep 17 00:00:00 2001 From: zr_jin Date: Mon, 27 Jan 2025 16:05:11 +0800 Subject: [PATCH] Update utils.py --- egs/wenetspeech4tts/TTS/f5-tts/model/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/egs/wenetspeech4tts/TTS/f5-tts/model/utils.py b/egs/wenetspeech4tts/TTS/f5-tts/model/utils.py index 038ed0315..09c5fc468 100644 --- a/egs/wenetspeech4tts/TTS/f5-tts/model/utils.py +++ b/egs/wenetspeech4tts/TTS/f5-tts/model/utils.py @@ -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() @@ -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)