1
0
mirror of https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git synced 2026-06-07 19:40:44 +08:00

fix(train): cannot extract feature on non-cuda devices (fix #123)

This commit is contained in:
源文雨
2025-07-08 16:40:38 +09:00
parent 55a981d470
commit 033306439c
4 changed files with 43 additions and 74 deletions

View File

@@ -194,11 +194,11 @@ def download_all_assets(tmpdir: str, version="0.2.5"):
if not architecture:
logger.error(f"architecture {architecture} is not supported")
exit(1)
BASE_URL = "https://github.com/fumiama/RVC-Models-Downloader/releases/download/"
suffix = "zip" if is_win else "tar.gz"
RVCMD_URL = BASE_URL + f"v{version}/rvcmd_{system_type}_{architecture}.{suffix}"
cmdfile = os.path.join(tmpdir, "rvcmd")
try:
BASE_URL = "https://github.com/fumiama/RVC-Models-Downloader/releases/download/"
suffix = "zip" if is_win else "tar.gz"
RVCMD_URL = BASE_URL + f"v{version}/rvcmd_{system_type}_{architecture}.{suffix}"
cmdfile = os.path.join(tmpdir, "rvcmd")
if is_win:
download_and_extract_zip(RVCMD_URL, tmpdir)
cmdfile += ".exe"

View File

@@ -10,19 +10,17 @@ from infer.lib.audio import load_audio
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
os.environ["PYTORCH_MPS_HIGH_WATERMARK_RATIO"] = "0.0"
if len(sys.argv) != 8:
sys.exit(0)
device = sys.argv[1]
n_part = int(sys.argv[2])
i_part = int(sys.argv[3])
if len(sys.argv) == 7:
exp_dir = sys.argv[4]
version = sys.argv[5]
is_half = sys.argv[6].lower() == "true"
else:
i_gpu = sys.argv[4]
exp_dir = sys.argv[5]
os.environ["CUDA_VISIBLE_DEVICES"] = str(i_gpu)
version = sys.argv[6]
is_half = sys.argv[7].lower() == "true"
i_gpu = sys.argv[4]
os.environ["CUDA_VISIBLE_DEVICES"] = str(i_gpu)
exp_dir = sys.argv[5]
version = sys.argv[6]
is_half = sys.argv[7].lower() == "true"
import fairseq
import numpy as np