From 2c847fbe6dae202912ef85799446472cafa53a27 Mon Sep 17 00:00:00 2001 From: Alcoft <101468238+alcoftTAO@users.noreply.github.com> Date: Wed, 16 Jul 2025 03:07:56 +0000 Subject: [PATCH] Pytorch>=2.6 fix (#52) * Fix bug with Intel GPUs. * Updated .gitignore * Fix newer pytorch version's error --- pyproject.toml | 4 ++-- rvc/modules/vc/modules.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fdc1164..6c53b68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,8 +11,8 @@ github = "https://github.com/RVC-Project/Retrieval-based-Voice-Conversion" [tool.poetry.dependencies] python = "^3.10" torch = "^2.1.0" -fairseq = "^0.12.2" -# fairseq = {git = "https://github.com/Tps-F/fairseq.git", branch="main"} +#fairseq = "^0.12.2" +fairseq = {git = "https://github.com/Tps-F/fairseq.git", branch="main"} soundfile = "^0.12.1" librosa = "^0.10.1" praat-parselmouth = "^0.4.3" diff --git a/rvc/modules/vc/modules.py b/rvc/modules/vc/modules.py index 54ed383..56c8e90 100644 --- a/rvc/modules/vc/modules.py +++ b/rvc/modules/vc/modules.py @@ -47,7 +47,7 @@ class VC: person = sid if os.path.exists(sid) else f'{os.getenv("weight_root")}/{sid}' logger.info(f"Loading: {person}") - self.cpt = torch.load(person, map_location="cpu") + self.cpt = torch.load(person, weights_only=False, map_location="cpu") self.tgt_sr = self.cpt["config"][-1] self.cpt["config"][-3] = self.cpt["weight"]["emb_g.weight"].shape[0] # n_spk self.if_f0 = self.cpt.get("f0", 1)