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