1
0
mirror of https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git synced 2026-06-05 09:10:25 +08:00

optimize(rvc): gather residuals

This commit is contained in:
源文雨
2024-06-08 00:44:46 +09:00
parent eb24434260
commit b91dcf2261
9 changed files with 210 additions and 200 deletions

View File

@@ -1,3 +1,5 @@
from typing import Optional
import numpy as np
import torch
from torch.nn import functional as F
@@ -13,7 +15,7 @@ def piecewise_rational_quadratic_transform(
unnormalized_heights: torch.Tensor,
unnormalized_derivatives: torch.Tensor,
inverse: bool = False,
tails: str | None = None,
tails: Optional[str] = None,
tail_bound: float = 1.0,
min_bin_width=DEFAULT_MIN_BIN_WIDTH,
min_bin_height=DEFAULT_MIN_BIN_HEIGHT,