Skip to content

Commit

Permalink
Merge pull request #931 from IAHispano/formatter/main
Browse files Browse the repository at this point in the history
chore(format): run black on main
  • Loading branch information
blaisewf authored Dec 28, 2024
2 parents e294f0a + 15db4b6 commit c51ac15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rvc/lib/algorithm/generators/hifigan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions rvc/lib/algorithm/residuals.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c51ac15

Please sign in to comment.