diff --git a/matcha/hifigan/models.py b/matcha/hifigan/models.py index d209d9a..4d2c7fd 100644 --- a/matcha/hifigan/models.py +++ b/matcha/hifigan/models.py @@ -1,7 +1,7 @@ """ from https://github.com/jik876/hifi-gan """ import torch -import torch.nn as nn +from torch import nn import torch.nn.functional as F from torch.nn import AvgPool1d, Conv1d, Conv2d, ConvTranspose1d from torch.nn.utils import remove_weight_norm, spectral_norm, weight_norm diff --git a/matcha/models/components/decoder.py b/matcha/models/components/decoder.py index 1137cd7..a82762e 100644 --- a/matcha/models/components/decoder.py +++ b/matcha/models/components/decoder.py @@ -2,7 +2,7 @@ import math from typing import Optional import torch -import torch.nn as nn +from torch import nn import torch.nn.functional as F from conformer import ConformerBlock from diffusers.models.activations import get_activation diff --git a/matcha/models/components/text_encoder.py b/matcha/models/components/text_encoder.py index a388d05..eb0c113 100644 --- a/matcha/models/components/text_encoder.py +++ b/matcha/models/components/text_encoder.py @@ -3,10 +3,10 @@ import math import torch -import torch.nn as nn +from torch import nn from einops import rearrange -import matcha.utils as utils +from matcha import utils from matcha.utils.model import sequence_mask log = utils.get_pylogger(__name__) diff --git a/matcha/models/components/transformer.py b/matcha/models/components/transformer.py index dd1afa3..db5dee3 100644 --- a/matcha/models/components/transformer.py +++ b/matcha/models/components/transformer.py @@ -1,7 +1,7 @@ from typing import Any, Dict, Optional import torch -import torch.nn as nn +from torch import nn from diffusers.models.attention import ( GEGLU, GELU, diff --git a/matcha/models/matcha_tts.py b/matcha/models/matcha_tts.py index 07f95ad..4aedf99 100644 --- a/matcha/models/matcha_tts.py +++ b/matcha/models/matcha_tts.py @@ -4,7 +4,7 @@ import random import torch -import matcha.utils.monotonic_align as monotonic_align +from matcha.utils import monotonic_align from matcha import utils from matcha.models.baselightningmodule import BaseLightningClass from matcha.models.components.flow_matching import CFM