From bd058a68f7c8cf61e3e402126f3bca18ee60dda0 Mon Sep 17 00:00:00 2001 From: Jim O'Regan Date: Wed, 2 Oct 2024 13:21:00 +0000 Subject: [PATCH] R0402 --- matcha/hifigan/models.py | 2 +- matcha/models/components/decoder.py | 2 +- matcha/models/components/text_encoder.py | 4 ++-- matcha/models/components/transformer.py | 2 +- matcha/models/matcha_tts.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) 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