Fix RegEX

This commit is contained in:
Ziyao Wang 2024-08-01 19:34:16 +08:00 committed by GitHub
parent 7670bc77c3
commit 514747cf4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -106,7 +106,7 @@ SoVITS_names,GPT_names = get_weights_names()
def custom_sort_key(s):
# 使用正则表达式提取字符串中的数字部分和非数字部分
parts = re.split('(\d+)', s)
parts = re.split(r'(\d+)', s)
# 将数字部分转换为整数,非数字部分保持不变
parts = [int(part) if part.isdigit() else part for part in parts]
return parts