mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-07 15:19:59 +08:00
修改显卡设备编号循环写入的bug
修改显卡设备编号循环写入的bug,导致首次循环报错
This commit is contained in:
parent
57dde51e11
commit
746b19bedb
12
webui.py
12
webui.py
@ -377,10 +377,14 @@ def open1a(inp_text,inp_wav_dir,exp_name,gpu_numbers,bert_pretrained_dir):
|
||||
p.wait()
|
||||
opt = []
|
||||
for i_part in range(all_parts):
|
||||
txt_path = "%s/2-name2text-%s.txt" % (opt_dir, i_part)
|
||||
with open(txt_path, "r", encoding="utf8") as f:
|
||||
opt += f.read().strip("\n").split("\n")
|
||||
os.remove(txt_path)
|
||||
try:
|
||||
txt_path = "%s/2-name2text-%s.txt" % (opt_dir, i_part)
|
||||
with open(txt_path, "r", encoding="utf8") as f:
|
||||
opt += f.read().strip("\n").split("\n")
|
||||
os.remove(txt_path)
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
pass
|
||||
path_text = "%s/2-name2text.txt" % opt_dir
|
||||
with open(path_text, "w", encoding="utf8") as f:
|
||||
f.write("\n".join(opt) + "\n")
|
||||
|
Loading…
x
Reference in New Issue
Block a user