mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 21:45:00 +03:00
bugfix: diffusionsvc sample
This commit is contained in:
parent
38d7ec8c4f
commit
ff21c8130e
@ -9,6 +9,7 @@ import argparse
|
||||
from Exceptions import WeightDownladException
|
||||
from downloader.SampleDownloader import downloadInitialSamples
|
||||
from downloader.WeightDownloader import downloadWeight
|
||||
from voice_changer.VoiceChangerParamsManager import VoiceChangerParamsManager
|
||||
|
||||
from voice_changer.utils.VoiceChangerParams import VoiceChangerParams
|
||||
|
||||
@ -96,6 +97,8 @@ voiceChangerParams = VoiceChangerParams(
|
||||
rmvpe=args.rmvpe,
|
||||
sample_mode=args.sample_mode,
|
||||
)
|
||||
vcparams = VoiceChangerParamsManager.get_instance()
|
||||
vcparams.setParams(voiceChangerParams)
|
||||
|
||||
printMessage(f"Booting PHASE :{__name__}", level=2)
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
import os
|
||||
from const import EnumInferenceTypes
|
||||
from dataclasses import asdict
|
||||
import onnxruntime
|
||||
import json
|
||||
|
||||
|
||||
from data.ModelSlot import DiffusionSVCModelSlot, ModelSlot, RVCModelSlot
|
||||
from voice_changer.DiffusionSVC.inferencer.diffusion_svc_model.diffusion.unit2mel import load_model_vocoder_from_combo
|
||||
|
@ -133,7 +133,6 @@ class DiffusionSVCInferencer(Inferencer):
|
||||
out_wav *= mask
|
||||
else:
|
||||
out_wav = self.vocoder_onnx.infer(gt_spec, pitch, silence_front, mask)
|
||||
# out_wav = self.vocoder_onnx.infer(gt_spec, pitch, 0, mask)
|
||||
# print("[ ----Timer::3: ]", t.secs)
|
||||
|
||||
return out_wav.squeeze()
|
||||
|
@ -121,8 +121,6 @@ class VoiceChangerManager(ServerDeviceCallbacks):
|
||||
@classmethod
|
||||
def get_instance(cls, params: VoiceChangerParams):
|
||||
if cls._instance is None:
|
||||
vcparams = VoiceChangerParamsManager.get_instance()
|
||||
vcparams.setParams(params)
|
||||
cls._instance = cls(params)
|
||||
return cls._instance
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user