https://hf.co/hexgrad/Kokoro-82M
Python
Fix a couple minor warnings (#210)
Eric Izoita4b647d371e83
diff --git a/kokoro/istftnet.py b/kokoro/istftnet.pyindex cb22279..f1c536e 100644--- a/kokoro/istftnet.py+++ b/kokoro/istftnet.py@@ -1,6 +1,6 @@# ADAPTED from https://github.com/yl4579/StyleTTS2/blob/main/Modules/istftnet.pyfrom kokoro.custom_stft import CustomSTFT-from torch.nn.utils import weight_norm+from torch.nn.utils.parametrizations import weight_normimport mathimport torchimport torch.nn as nndiff --git a/kokoro/modules.py b/kokoro/modules.pyindex 05d1575..f183bd3 100644--- a/kokoro/modules.py+++ b/kokoro/modules.py@@ -1,6 +1,6 @@# https://github.com/yl4579/StyleTTS2/blob/main/models.pyfrom .istftnet import AdainResBlk1d-from torch.nn.utils import weight_norm+from torch.nn.utils.parametrizations import weight_normfrom transformers import AlbertModelimport numpy as npimport torch@@ -139,7 +139,7 @@ class DurationEncoder(nn.Module):super().__init__()self.lstms = nn.ModuleList()for _ in range(nlayers):- self.lstms.append(nn.LSTM(d_model + sty_dim, d_model // 2, num_layers=1, batch_first=True, bidirectional=True, dropout=dropout))+ self.lstms.append(nn.LSTM(d_model + sty_dim, d_model // 2, num_layers=1, batch_first=True, bidirectional=True))self.lstms.append(AdaLayerNorm(sty_dim, d_model))self.dropout = dropoutself.d_model = d_model