Pytorch>=2.6 fix (#52)

* Fix bug with Intel GPUs.

* Updated .gitignore

* Fix newer pytorch version's error
This commit is contained in:
Alcoft
2025-07-16 03:07:56 +00:00
committed by GitHub
parent 3b7e87831a
commit 2c847fbe6d
2 changed files with 3 additions and 3 deletions

View File

@@ -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"

View File

@@ -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)