Spaces:
Running
Running
ozipoetra commited on
Commit ·
66a4ae8
1
Parent(s): 051dd61
fix: correct all lib.rvc.lib imports to lib.rvc
Browse files- Replace 'from lib.rvc.lib.' with 'from lib.rvc.' in all files
- Fixes ModuleNotFoundError when loading VoiceConverter
- lib/rvc/algorithm/attentions.py +1 -1
- lib/rvc/algorithm/encoders.py +4 -4
- lib/rvc/algorithm/generators/hifigan.py +2 -2
- lib/rvc/algorithm/generators/hifigan_nsf.py +3 -3
- lib/rvc/algorithm/generators/refinegan.py +1 -1
- lib/rvc/algorithm/modules.py +1 -1
- lib/rvc/algorithm/residuals.py +2 -2
- lib/rvc/algorithm/synthesizers.py +7 -7
- lib/rvc/converter.py +3 -3
- lib/rvc/predictors/F0Extractor.py +1 -1
- lib/rvc/predictors/f0.py +1 -1
lib/rvc/algorithm/attentions.py
CHANGED
|
@@ -2,7 +2,7 @@ import math
|
|
| 2 |
|
| 3 |
import torch
|
| 4 |
|
| 5 |
-
from lib.rvc.
|
| 6 |
|
| 7 |
|
| 8 |
class MultiHeadAttention(torch.nn.Module):
|
|
|
|
| 2 |
|
| 3 |
import torch
|
| 4 |
|
| 5 |
+
from lib.rvc.algorithm.commons import convert_pad_shape
|
| 6 |
|
| 7 |
|
| 8 |
class MultiHeadAttention(torch.nn.Module):
|
lib/rvc/algorithm/encoders.py
CHANGED
|
@@ -3,10 +3,10 @@ import math
|
|
| 3 |
|
| 4 |
import torch
|
| 5 |
|
| 6 |
-
from lib.rvc.
|
| 7 |
-
from lib.rvc.
|
| 8 |
-
from lib.rvc.
|
| 9 |
-
from lib.rvc.
|
| 10 |
|
| 11 |
logger = logging.getLogger(__name__)
|
| 12 |
|
|
|
|
| 3 |
|
| 4 |
import torch
|
| 5 |
|
| 6 |
+
from lib.rvc.algorithm.attentions import FFN, MultiHeadAttention
|
| 7 |
+
from lib.rvc.algorithm.commons import sequence_mask
|
| 8 |
+
from lib.rvc.algorithm.modules import WaveNet
|
| 9 |
+
from lib.rvc.algorithm.normalization import LayerNorm
|
| 10 |
|
| 11 |
logger = logging.getLogger(__name__)
|
| 12 |
|
lib/rvc/algorithm/generators/hifigan.py
CHANGED
|
@@ -6,8 +6,8 @@ import torch
|
|
| 6 |
from torch.nn.utils import remove_weight_norm
|
| 7 |
from torch.nn.utils.parametrizations import weight_norm
|
| 8 |
|
| 9 |
-
from lib.rvc.
|
| 10 |
-
from lib.rvc.
|
| 11 |
|
| 12 |
|
| 13 |
class HiFiGANGenerator(torch.nn.Module):
|
|
|
|
| 6 |
from torch.nn.utils import remove_weight_norm
|
| 7 |
from torch.nn.utils.parametrizations import weight_norm
|
| 8 |
|
| 9 |
+
from lib.rvc.algorithm.commons import init_weights
|
| 10 |
+
from lib.rvc.algorithm.residuals import LRELU_SLOPE, ResBlock
|
| 11 |
|
| 12 |
|
| 13 |
class HiFiGANGenerator(torch.nn.Module):
|
lib/rvc/algorithm/generators/hifigan_nsf.py
CHANGED
|
@@ -7,9 +7,9 @@ from torch.nn.utils import remove_weight_norm
|
|
| 7 |
from torch.nn.utils.parametrizations import weight_norm
|
| 8 |
from torch.utils.checkpoint import checkpoint
|
| 9 |
|
| 10 |
-
from lib.rvc.
|
| 11 |
-
from lib.rvc.
|
| 12 |
-
from lib.rvc.
|
| 13 |
|
| 14 |
|
| 15 |
class SourceModuleHnNSF(torch.nn.Module):
|
|
|
|
| 7 |
from torch.nn.utils.parametrizations import weight_norm
|
| 8 |
from torch.utils.checkpoint import checkpoint
|
| 9 |
|
| 10 |
+
from lib.rvc.algorithm.commons import init_weights
|
| 11 |
+
from lib.rvc.algorithm.generators.hifigan import SineGenerator
|
| 12 |
+
from lib.rvc.algorithm.residuals import LRELU_SLOPE, ResBlock
|
| 13 |
|
| 14 |
|
| 15 |
class SourceModuleHnNSF(torch.nn.Module):
|
lib/rvc/algorithm/generators/refinegan.py
CHANGED
|
@@ -8,7 +8,7 @@ from torch.nn.utils import remove_weight_norm
|
|
| 8 |
from torch.nn.utils.parametrizations import weight_norm
|
| 9 |
from torch.utils.checkpoint import checkpoint
|
| 10 |
|
| 11 |
-
from lib.rvc.
|
| 12 |
|
| 13 |
|
| 14 |
class ResBlock(nn.Module):
|
|
|
|
| 8 |
from torch.nn.utils.parametrizations import weight_norm
|
| 9 |
from torch.utils.checkpoint import checkpoint
|
| 10 |
|
| 11 |
+
from lib.rvc.algorithm.commons import get_padding, init_weights
|
| 12 |
|
| 13 |
|
| 14 |
class ResBlock(nn.Module):
|
lib/rvc/algorithm/modules.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import torch
|
| 2 |
|
| 3 |
-
from lib.rvc.
|
| 4 |
|
| 5 |
|
| 6 |
class WaveNet(torch.nn.Module):
|
|
|
|
| 1 |
import torch
|
| 2 |
|
| 3 |
+
from lib.rvc.algorithm.commons import fused_add_tanh_sigmoid_multiply
|
| 4 |
|
| 5 |
|
| 6 |
class WaveNet(torch.nn.Module):
|
lib/rvc/algorithm/residuals.py
CHANGED
|
@@ -6,8 +6,8 @@ import torch
|
|
| 6 |
from torch.nn.utils import remove_weight_norm
|
| 7 |
from torch.nn.utils.parametrizations import weight_norm
|
| 8 |
|
| 9 |
-
from lib.rvc.
|
| 10 |
-
from lib.rvc.
|
| 11 |
|
| 12 |
LRELU_SLOPE = 0.1
|
| 13 |
|
|
|
|
| 6 |
from torch.nn.utils import remove_weight_norm
|
| 7 |
from torch.nn.utils.parametrizations import weight_norm
|
| 8 |
|
| 9 |
+
from lib.rvc.algorithm.commons import get_padding, init_weights
|
| 10 |
+
from lib.rvc.algorithm.modules import WaveNet
|
| 11 |
|
| 12 |
LRELU_SLOPE = 0.1
|
| 13 |
|
lib/rvc/algorithm/synthesizers.py
CHANGED
|
@@ -4,13 +4,13 @@ import logging
|
|
| 4 |
|
| 5 |
import torch
|
| 6 |
|
| 7 |
-
from lib.rvc.
|
| 8 |
-
from lib.rvc.
|
| 9 |
-
from lib.rvc.
|
| 10 |
-
from lib.rvc.
|
| 11 |
-
from lib.rvc.
|
| 12 |
-
from lib.rvc.
|
| 13 |
-
from lib.rvc.
|
| 14 |
|
| 15 |
logger = logging.getLogger(__name__)
|
| 16 |
|
|
|
|
| 4 |
|
| 5 |
import torch
|
| 6 |
|
| 7 |
+
from lib.rvc.algorithm.commons import rand_slice_segments, slice_segments
|
| 8 |
+
from lib.rvc.algorithm.encoders import PosteriorEncoder, TextEncoder
|
| 9 |
+
from lib.rvc.algorithm.generators.hifigan import HiFiGANGenerator
|
| 10 |
+
from lib.rvc.algorithm.generators.hifigan_mrf import HiFiGANMRFGenerator
|
| 11 |
+
from lib.rvc.algorithm.generators.hifigan_nsf import HiFiGANNSFGenerator
|
| 12 |
+
from lib.rvc.algorithm.generators.refinegan import RefineGANGenerator
|
| 13 |
+
from lib.rvc.algorithm.residuals import ResidualCouplingBlock
|
| 14 |
|
| 15 |
logger = logging.getLogger(__name__)
|
| 16 |
|
lib/rvc/converter.py
CHANGED
|
@@ -32,9 +32,9 @@ import lazy_loader as lazy
|
|
| 32 |
|
| 33 |
from lib.rvc.config import Config
|
| 34 |
from lib.rvc.pipeline import Pipeline as VC
|
| 35 |
-
from lib.rvc.
|
| 36 |
-
from lib.rvc.
|
| 37 |
-
from lib.rvc.
|
| 38 |
|
| 39 |
if TYPE_CHECKING:
|
| 40 |
import noisereduce as nr
|
|
|
|
| 32 |
|
| 33 |
from lib.rvc.config import Config
|
| 34 |
from lib.rvc.pipeline import Pipeline as VC
|
| 35 |
+
from lib.rvc.algorithm.synthesizers import Synthesizer
|
| 36 |
+
from lib.rvc.tools.split_audio import merge_audio, process_audio
|
| 37 |
+
from lib.rvc.utils import load_audio_infer, load_embedding
|
| 38 |
|
| 39 |
if TYPE_CHECKING:
|
| 40 |
import noisereduce as nr
|
lib/rvc/predictors/F0Extractor.py
CHANGED
|
@@ -16,7 +16,7 @@ from lib.rvc.common import RVC_MODELS_DIR
|
|
| 16 |
from lib.rvc.configs.config import Config
|
| 17 |
|
| 18 |
# from tools.anyf0.rmvpe import RMVPE
|
| 19 |
-
from lib.rvc.
|
| 20 |
|
| 21 |
config = Config()
|
| 22 |
|
|
|
|
| 16 |
from lib.rvc.configs.config import Config
|
| 17 |
|
| 18 |
# from tools.anyf0.rmvpe import RMVPE
|
| 19 |
+
from lib.rvc.predictors.RMVPE import RMVPE0Predictor
|
| 20 |
|
| 21 |
config = Config()
|
| 22 |
|
lib/rvc/predictors/f0.py
CHANGED
|
@@ -6,7 +6,7 @@ import torch
|
|
| 6 |
import torchcrepe
|
| 7 |
|
| 8 |
from lib.rvc.common import RVC_MODELS_DIR
|
| 9 |
-
from lib.rvc.
|
| 10 |
|
| 11 |
|
| 12 |
class RMVPE:
|
|
|
|
| 6 |
import torchcrepe
|
| 7 |
|
| 8 |
from lib.rvc.common import RVC_MODELS_DIR
|
| 9 |
+
from lib.rvc.predictors.RMVPE import RMVPE0Predictor
|
| 10 |
|
| 11 |
|
| 12 |
class RMVPE:
|