improve: launch sequence

This commit is contained in:
w-okada 2023-07-23 19:39:52 +09:00
parent ff0a80362a
commit f98d4a38e0
10 changed files with 21 additions and 11 deletions

View File

@ -3,7 +3,7 @@ from dataclasses import dataclass, field
@dataclass @dataclass
class DDSP_SVCSettings: class DDSP_SVCSettings:
gpu: int = 0 gpu: int = -9999
dstId: int = 1 dstId: int = 1
f0Detector: str = "dio" # dio or harvest or crepe # parselmouth f0Detector: str = "dio" # dio or harvest or crepe # parselmouth

View File

@ -3,7 +3,7 @@ from dataclasses import dataclass, field
@dataclass @dataclass
class DiffusionSVCSettings: class DiffusionSVCSettings:
gpu: int = 0 gpu: int = -9999
dstId: int = 0 dstId: int = 0
f0Detector: str = "harvest" # dio or harvest f0Detector: str = "harvest" # dio or harvest

View File

@ -37,7 +37,7 @@ from Exceptions import NoModeLoadedException
@dataclass @dataclass
class MMVCv13Settings: class MMVCv13Settings:
gpu: int = 0 gpu: int = -9999
srcId: int = 0 srcId: int = 0
dstId: int = 101 dstId: int = 101
@ -247,5 +247,5 @@ class MMVCv13:
if file_path.find(remove_path + os.path.sep) >= 0: if file_path.find(remove_path + os.path.sep) >= 0:
# print("remove", key, file_path) # print("remove", key, file_path)
sys.modules.pop(key) sys.modules.pop(key)
except: # type:ignore except: # NOQA
pass pass

View File

@ -40,7 +40,7 @@ providers = [
@dataclass @dataclass
class MMVCv15Settings: class MMVCv15Settings:
gpu: int = 0 gpu: int = -9999
srcId: int = 0 srcId: int = 0
dstId: int = 101 dstId: int = 101

View File

@ -51,7 +51,7 @@ class RVC(VoiceChangerModel):
self.feature_buffer: FeatureInOut | None = None self.feature_buffer: FeatureInOut | None = None
self.prevVol = 0.0 self.prevVol = 0.0
self.slotInfo = slotInfo self.slotInfo = slotInfo
self.initialize() # self.initialize()
def initialize(self): def initialize(self):
print("[Voice Changer] [RVC] Initializing... ") print("[Voice Changer] [RVC] Initializing... ")
@ -231,7 +231,7 @@ class RVC(VoiceChangerModel):
torch.cuda.empty_cache() torch.cuda.empty_cache()
self.initialize() self.initialize()
output_file_simple = export2onnx(self.settings.gpu, modelSlot) output_file_simple = export2onnx(self.settings.gpu, modelSlot)
return { return {

View File

@ -3,7 +3,7 @@ from dataclasses import dataclass, field
@dataclass @dataclass
class RVCSettings: class RVCSettings:
gpu: int = 0 gpu: int = -9999
dstId: int = 0 dstId: int = 0
f0Detector: str = "harvest" # dio or harvest f0Detector: str = "harvest" # dio or harvest

View File

@ -44,7 +44,7 @@ providers = [
@dataclass @dataclass
class SoVitsSvc40Settings: class SoVitsSvc40Settings:
gpu: int = 0 gpu: int = -9999
dstId: int = 0 dstId: int = 0
f0Detector: str = "harvest" # dio or harvest f0Detector: str = "harvest" # dio or harvest

View File

@ -79,8 +79,10 @@ class VoiceChangerManager(ServerDeviceCallbacks):
self.stored_setting: dict[str, str | int | float] = {} self.stored_setting: dict[str, str | int | float] = {}
if os.path.exists(STORED_SETTING_FILE): if os.path.exists(STORED_SETTING_FILE):
self.stored_setting = json.load(open(STORED_SETTING_FILE, "r", encoding="utf-8")) self.stored_setting = json.load(open(STORED_SETTING_FILE, "r", encoding="utf-8"))
for key, val in self.stored_setting.items(): if "modelSlotIndex" in self.stored_setting:
self.update_settings(key, val) self.update_settings("modelSlotIndex", self.stored_setting["modelSlotIndex"])
# for key, val in self.stored_setting.items():
# self.update_settings(key, val)
def store_setting(self, key: str, val: str | int | float): def store_setting(self, key: str, val: str | int | float):
saveItemForServerDevice = ["enableServerAudio", "serverAudioSampleRate", "serverInputDeviceId", "serverOutputDeviceId", "serverMonitorDeviceId", "serverReadChunkSize", "serverInputAudioGain", "serverOutputAudioGain"] saveItemForServerDevice = ["enableServerAudio", "serverAudioSampleRate", "serverInputDeviceId", "serverOutputDeviceId", "serverMonitorDeviceId", "serverReadChunkSize", "serverInputAudioGain", "serverOutputAudioGain"]

View File

@ -104,6 +104,10 @@ Q6. My AMD GPU isn't being used.
A6. Please use the DirectML version. Additionally, AMD GPUs are only enabled for ONNX models. You can judge this by the GPU utilization rate going up in the Performance Monitor.([see here](https://github.com/w-okada/voice-changer/issues/383)) A6. Please use the DirectML version. Additionally, AMD GPUs are only enabled for ONNX models. You can judge this by the GPU utilization rate going up in the Performance Monitor.([see here](https://github.com/w-okada/voice-changer/issues/383))
Q7. onxxruntime is not launching and it's producing an error.
A7. It appears that an error occurs if the folder path contains unicode. Please extract to a path that does not use unicode (just alphanumeric characters). (Reference: https://github.com/w-okada/voice-changer/issues/528)
## Configurable items ## Configurable items
## Title ## Title

View File

@ -105,6 +105,10 @@ Q6. (AMD ユーザ) GPU が使用されていないような気がする。
A6. DirectML 版を使用してください。また、AMD の GPU は ONNX モデルでのみ有効になります。パフォーマンスモニターで GPU の使用率が上がっていることで判断できます。([see here](https://github.com/w-okada/voice-changer/issues/383)) A6. DirectML 版を使用してください。また、AMD の GPU は ONNX モデルでのみ有効になります。パフォーマンスモニターで GPU の使用率が上がっていることで判断できます。([see here](https://github.com/w-okada/voice-changer/issues/383))
Q7. onxxruntime がエラーを出力して起動しない。
A7. フォルダのパスに unicode が含まれるとエラーが出るようです。unicode を使わないパス(英数字のみ)に解凍してください。参考https://github.com/w-okada/voice-changer/issues/528
# GUI の詳細 # GUI の詳細
## タイトルエリア ## タイトルエリア