1
0
mirror of https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git synced 2026-06-05 09:10:25 +08:00

fix: Add weight whitelist support for torch 2.6 (#110)

This commit is contained in:
Yongkun Li
2025-02-07 15:26:01 +08:00
committed by GitHub
parent e1aeb16630
commit ef9c8eb656
7 changed files with 45 additions and 21 deletions

View File

@@ -96,6 +96,10 @@ if __name__ == "__main__":
# exp_dir=r"E:\codes\py39\dataset\mi-test"
# n_p=16
# f = open("%s/log_extract_f0.log"%exp_dir, "w")
from configs import Config
Config.use_insecure_load()
printt(" ".join(sys.argv))
featureInput = FeatureInput(is_half, device)
paths = []

View File

@@ -23,11 +23,15 @@ else:
os.environ["CUDA_VISIBLE_DEVICES"] = str(i_gpu)
version = sys.argv[6]
is_half = sys.argv[7].lower() == "true"
import fairseq
import numpy as np
import torch
import torch.nn.functional as F
from configs import Config
Config.use_insecure_load()
if "privateuseone" not in device:
device = "cpu"
if torch.cuda.is_available():

View File

@@ -142,4 +142,6 @@ def preprocess_trainset(inp_root, sr, n_p, exp_dir, per):
if __name__ == "__main__":
from configs import Config
Config.use_insecure_load()
preprocess_trainset(inp_root, sr, n_p, exp_dir, per)