From 34066aa4f6e9ac2caa08d879b18598f6ad99c223 Mon Sep 17 00:00:00 2001 From: wataru Date: Mon, 26 Jun 2023 10:03:12 +0900 Subject: [PATCH] resume thread --- server/voice_changer/RVC/inferencer/voras_beta/commons.py | 6 ------ server/voice_changer/SoVitsSvc40/models/modules/commons.py | 2 +- server/voice_changer/VoiceChangerManager.py | 5 +++-- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/server/voice_changer/RVC/inferencer/voras_beta/commons.py b/server/voice_changer/RVC/inferencer/voras_beta/commons.py index 16c274aa6..66019df2b 100644 --- a/server/voice_changer/RVC/inferencer/voras_beta/commons.py +++ b/server/voice_changer/RVC/inferencer/voras_beta/commons.py @@ -108,12 +108,6 @@ def fused_add_tanh_sigmoid_multiply(input_a, input_b, n_channels): return acts -def convert_pad_shape(pad_shape): - l = pad_shape[::-1] - pad_shape = [item for sublist in l for item in sublist] - return pad_shape - - def shift_1d(x): x = F.pad(x, convert_pad_shape([[0, 0], [0, 0], [1, 0]]))[:, :, :-1] return x diff --git a/server/voice_changer/SoVitsSvc40/models/modules/commons.py b/server/voice_changer/SoVitsSvc40/models/modules/commons.py index df0a072f3..599894ecc 100644 --- a/server/voice_changer/SoVitsSvc40/models/modules/commons.py +++ b/server/voice_changer/SoVitsSvc40/models/modules/commons.py @@ -121,7 +121,7 @@ def subsequent_mask(length): return mask -#@torch.jit.script +# @torch.jit.script @torch.jit._script_if_tracing def fused_add_tanh_sigmoid_multiply(input_a, input_b, n_channels): n_channels_int = n_channels[0] diff --git a/server/voice_changer/VoiceChangerManager.py b/server/voice_changer/VoiceChangerManager.py index d2a2888eb..6185371cc 100644 --- a/server/voice_changer/VoiceChangerManager.py +++ b/server/voice_changer/VoiceChangerManager.py @@ -1,6 +1,7 @@ import json import os import shutil +import threading import numpy as np from downloader.SampleDownloader import downloadSample, getSampleInfos from voice_changer.Local.ServerDevice import ServerDevice, ServerDeviceCallbacks @@ -66,8 +67,8 @@ def __init__(self, params: VoiceChangerParams): self.serverDevice = ServerDevice(self) - # thread = threading.Thread(target=self.serverDevice.start, args=()) - # thread.start() + thread = threading.Thread(target=self.serverDevice.start, args=()) + thread.start() # 設定保存用情報 self.stored_setting: dict[str, str | int | float] = {}