From c2569a101836a867a51a65eafc7594e4d4f62046 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 13:21:37 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- matcha/hifigan/models.py | 2 +- matcha/models/components/decoder.py | 2 +- matcha/models/components/text_encoder.py | 2 +- matcha/models/components/transformer.py | 2 +- matcha/models/matcha_tts.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/matcha/hifigan/models.py b/matcha/hifigan/models.py index 4d2c7fd..46abaf4 100644 --- a/matcha/hifigan/models.py +++ b/matcha/hifigan/models.py @@ -1,8 +1,8 @@ """ from https://github.com/jik876/hifi-gan """ import torch -from torch import nn import torch.nn.functional as F +from torch import nn 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 a82762e..aca5da1 100644 --- a/matcha/models/components/decoder.py +++ b/matcha/models/components/decoder.py @@ -2,11 +2,11 @@ import math from typing import Optional import torch -from torch import nn import torch.nn.functional as F from conformer import ConformerBlock from diffusers.models.activations import get_activation from einops import pack, rearrange, repeat +from torch import nn from matcha.models.components.transformer import BasicTransformerBlock diff --git a/matcha/models/components/text_encoder.py b/matcha/models/components/text_encoder.py index eb0c113..21cc7d4 100644 --- a/matcha/models/components/text_encoder.py +++ b/matcha/models/components/text_encoder.py @@ -3,8 +3,8 @@ import math import torch -from torch import nn from einops import rearrange +from torch import nn from matcha import utils from matcha.utils.model import sequence_mask diff --git a/matcha/models/components/transformer.py b/matcha/models/components/transformer.py index db5dee3..eaf0270 100644 --- a/matcha/models/components/transformer.py +++ b/matcha/models/components/transformer.py @@ -1,7 +1,6 @@ from typing import Any, Dict, Optional import torch -from torch import nn from diffusers.models.attention import ( GEGLU, GELU, @@ -12,6 +11,7 @@ from diffusers.models.attention import ( from diffusers.models.attention_processor import Attention from diffusers.models.lora import LoRACompatibleLinear from diffusers.utils.torch_utils import maybe_allow_in_graph +from torch import nn class SnakeBeta(nn.Module): diff --git a/matcha/models/matcha_tts.py b/matcha/models/matcha_tts.py index 4aedf99..93d9689 100644 --- a/matcha/models/matcha_tts.py +++ b/matcha/models/matcha_tts.py @@ -4,11 +4,11 @@ import random import torch -from matcha.utils import monotonic_align from matcha import utils from matcha.models.baselightningmodule import BaseLightningClass from matcha.models.components.flow_matching import CFM from matcha.models.components.text_encoder import TextEncoder +from matcha.utils import monotonic_align from matcha.utils.model import ( denormalize, duration_loss,