From 15db4b6908bab5ebb0e53490aa34ea5f87825ab4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 28 Dec 2024 21:49:49 +0000 Subject: [PATCH] chore(format): run black on main --- rvc/lib/algorithm/generators/hifigan.py | 2 +- rvc/lib/algorithm/residuals.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rvc/lib/algorithm/generators/hifigan.py b/rvc/lib/algorithm/generators/hifigan.py index cbb6f900..1f18dfac 100644 --- a/rvc/lib/algorithm/generators/hifigan.py +++ b/rvc/lib/algorithm/generators/hifigan.py @@ -73,7 +73,7 @@ def __init__( def forward(self, x: torch.Tensor, g: Optional[torch.Tensor] = None): # new tensor x = self.conv_pre(x) - + if g is not None: # in-place call x += self.cond(g) diff --git a/rvc/lib/algorithm/residuals.py b/rvc/lib/algorithm/residuals.py index 98424365..df7d544d 100644 --- a/rvc/lib/algorithm/residuals.py +++ b/rvc/lib/algorithm/residuals.py @@ -26,9 +26,11 @@ def create_conv1d_layer(channels, kernel_size, dilation): def apply_mask(tensor: torch.Tensor, mask: Optional[torch.Tensor]): return tensor * mask if mask else tensor + def apply_mask_(tensor: torch.Tensor, mask: Optional[torch.Tensor]): return tensor.mul_(mask) if mask else tensor + class ResBlock(torch.nn.Module): """ A residual block module that applies a series of 1D convolutional layers with residual connections.