mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-08 16:00:01 +08:00
Fix RegEX
This commit is contained in:
parent
514747cf4c
commit
ff8a0ea4a0
@ -255,7 +255,7 @@ def clean_checkpoints(path_to_models="logs/44k/", n_ckpts_to_keep=2, sort_by_tim
|
||||
for f in os.listdir(path_to_models)
|
||||
if os.path.isfile(os.path.join(path_to_models, f))
|
||||
]
|
||||
name_key = lambda _f: int(re.compile("._(\d+)\.pth").match(_f).group(1))
|
||||
name_key = lambda _f: int(re.compile(r"._(\d+)\.pth").match(_f).group(1))
|
||||
time_key = lambda _f: os.path.getmtime(os.path.join(path_to_models, _f))
|
||||
sort_key = time_key if sort_by_time else name_key
|
||||
x_sorted = lambda _x: sorted(
|
||||
|
Loading…
x
Reference in New Issue
Block a user