Fix: Don't list hidden files as models

Copying files from macOS to Linux would produce files starting with . _ that were incorrectly identified as model files.
This commit is contained in:
tsukumi
2024-09-23 08:22:20 +09:00
parent 245bfe54ae
commit faddb0a8a8
3 changed files with 9 additions and 3 deletions

View File

@@ -523,7 +523,8 @@ class TTSModelHolder:
[
f
for f in model_dir.iterdir()
if f.suffix in suffixes
# 上記 suffixes にマッチするファイルのみを取得し、. から始まるファイルは除外
if f.suffix in suffixes and not f.name.startswith(".")
]
)
if len(model_files) == 0: