skip diffusionsvc on mac

This commit is contained in:
w-okada 2023-07-29 04:24:36 +09:00
parent 73203a13e3
commit 172e3f7a1d

View File

@ -1,5 +1,6 @@
import json import json
import os import os
import sys
from concurrent.futures import ThreadPoolExecutor from concurrent.futures import ThreadPoolExecutor
from typing import Any, Tuple from typing import Any, Tuple
@ -7,7 +8,6 @@ from const import RVCSampleMode, getSampleJsonAndModelIds
from data.ModelSample import ModelSamples, generateModelSample from data.ModelSample import ModelSamples, generateModelSample
from data.ModelSlot import DiffusionSVCModelSlot, ModelSlot, RVCModelSlot from data.ModelSlot import DiffusionSVCModelSlot, ModelSlot, RVCModelSlot
from mods.log_control import VoiceChangaerLogger from mods.log_control import VoiceChangaerLogger
from voice_changer.DiffusionSVC.DiffusionSVCModelSlotGenerator import DiffusionSVCModelSlotGenerator
from voice_changer.ModelSlotManager import ModelSlotManager from voice_changer.ModelSlotManager import ModelSlotManager
from voice_changer.RVC.RVCModelSlotGenerator import RVCModelSlotGenerator from voice_changer.RVC.RVCModelSlotGenerator import RVCModelSlotGenerator
from downloader.Downloader import download, download_no_tqdm from downloader.Downloader import download, download_no_tqdm
@ -220,8 +220,10 @@ def _downloadSamples(samples: list[ModelSamples], sampleModelIds: list[Tuple[str
modelSlotManager.save_model_slot(targetSlotIndex, slotInfo) modelSlotManager.save_model_slot(targetSlotIndex, slotInfo)
elif slotInfo.voiceChangerType == "Diffusion-SVC": elif slotInfo.voiceChangerType == "Diffusion-SVC":
if slotInfo.isONNX: if sys.platform.startswith("darwin") is False:
pass from voice_changer.DiffusionSVC.DiffusionSVCModelSlotGenerator import DiffusionSVCModelSlotGenerator
else: if slotInfo.isONNX:
slotInfo = DiffusionSVCModelSlotGenerator._setInfoByPytorch(slotInfo) pass
modelSlotManager.save_model_slot(targetSlotIndex, slotInfo) else:
slotInfo = DiffusionSVCModelSlotGenerator._setInfoByPytorch(slotInfo)
modelSlotManager.save_model_slot(targetSlotIndex, slotInfo)