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

optimize(jit): package hierarchy

This commit is contained in:
源文雨
2024-06-03 15:41:25 +09:00
parent ae04d4f9cc
commit 17e703a9ad
7 changed files with 172 additions and 171 deletions

View File

@@ -3,7 +3,6 @@ import os
import sys
import traceback
from infer.lib import jit
from infer.lib.jit.get_synthesizer import get_synthesizer
from time import time as ttime
import fairseq
import faiss
@@ -114,7 +113,7 @@ class RVC:
self.net_g: nn.Module = None
def set_default_model():
self.net_g, cpt = get_synthesizer(self.pth_path, self.device)
self.net_g, cpt = jit.get_synthesizer(self.pth_path, self.device)
self.tgt_sr = cpt["config"][-1]
cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0]
self.if_f0 = cpt.get("f0", 1)