fix file location (#1239)

This commit is contained in:
Ftps
2023-09-17 07:37:15 +09:00
committed by GitHub
parent 644b595287
commit 09fc351828
4 changed files with 6 additions and 770 deletions

View File

@@ -51,7 +51,7 @@ class VC:
"__type__": "update",
}
if not sid:
if sid == "" or sid == []:
if self.hubert_model is not None: # 考虑到轮询, 需要加个判断看是否 sid 是由有模型切换到无模型的
logger.info("Clean model cache")
del (

View File

@@ -153,10 +153,10 @@ class Pipeline(object):
)
f0 = self.model_rmvpe.infer_from_audio(x, thred=0.03)
if "privateuseone" in str(self.device): # clean ortruntime memory
del self.model_rmvpe.model
del self.model_rmvpe
logger.info("Cleaning ortruntime memory")
if "privateuseone" in str(self.device): # clean ortruntime memory
del self.model_rmvpe.model
del self.model_rmvpe
logger.info("Cleaning ortruntime memory")
f0 *= pow(2, f0_up_key / 12)
# with open("test.txt","w")as f:f.write("\n".join([str(i)for i in f0.tolist()]))
@@ -362,7 +362,7 @@ class Pipeline(object):
)
pitch = pitch[:p_len]
pitchf = pitchf[:p_len]
if self.device == "mps" or "xpu" in self.device:
if "mps" not in str(self.device) or "xpu" not in str(self.device):
pitchf = pitchf.astype(np.float32)
pitch = torch.tensor(pitch, device=self.device).unsqueeze(0).long()
pitchf = torch.tensor(pitchf, device=self.device).unsqueeze(0).float()