Skip to content

Commit 09fc351

Browse files
authored
fix file location (#1239)
1 parent 644b595 commit 09fc351

File tree

4 files changed

+6
-770
lines changed

4 files changed

+6
-770
lines changed

infer/modules/vc/modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def get_vc(self, sid, *to_return_protect):
5151
"__type__": "update",
5252
}
5353

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

infer/modules/vc/pipeline.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ def get_f0(
153153
)
154154
f0 = self.model_rmvpe.infer_from_audio(x, thred=0.03)
155155

156-
if "privateuseone" in str(self.device): # clean ortruntime memory
157-
del self.model_rmvpe.model
158-
del self.model_rmvpe
159-
logger.info("Cleaning ortruntime memory")
156+
if "privateuseone" in str(self.device): # clean ortruntime memory
157+
del self.model_rmvpe.model
158+
del self.model_rmvpe
159+
logger.info("Cleaning ortruntime memory")
160160

161161
f0 *= pow(2, f0_up_key / 12)
162162
# with open("test.txt","w")as f:f.write("\n".join([str(i)for i in f0.tolist()]))
@@ -362,7 +362,7 @@ def pipeline(
362362
)
363363
pitch = pitch[:p_len]
364364
pitchf = pitchf[:p_len]
365-
if self.device == "mps" or "xpu" in self.device:
365+
if "mps" not in str(self.device) or "xpu" not in str(self.device):
366366
pitchf = pitchf.astype(np.float32)
367367
pitch = torch.tensor(pitch, device=self.device).unsqueeze(0).long()
368368
pitchf = torch.tensor(pitchf, device=self.device).unsqueeze(0).float()

modules.py

Lines changed: 0 additions & 307 deletions
This file was deleted.

0 commit comments

Comments
 (0)