support chinese name as model(exp) name

support chinese name as model(exp) name
This commit is contained in:
RVC-Boss
2024-02-15 16:31:06 +08:00
committed by GitHub
parent 8ed4d157b3
commit dd2c4d6d71
2 changed files with 9 additions and 8 deletions

View File

@@ -35,7 +35,8 @@ import shutil
def my_save(fea,path):#####fix issue: torch.save doesn't support chinese path
dir=os.path.dirname(path)
name=os.path.basename(path)
tmp_path="%s/%s%s.pth"%(dir,ttime(),i_part)
# tmp_path="%s/%s%s.pth"%(dir,ttime(),i_part)
tmp_path="%s%s.pth"%(ttime(),i_part)
torch.save(fea,tmp_path)
shutil.move(tmp_path,"%s/%s"%(dir,name))