prevent variable "model_name" from UnboundLocalError

This commit is contained in:
Андрей Петров committed 2025-03-03 19:11:09 +03:00
1 parent 7a59e9c20e
commit 90af3c2ec5
1 file changed
+1
+1
View File
@@ -267,6 +267,7 @@ class tts_class:
model_files = ["model_file.pth", "model.pth"]
found_any_models = False
model_name = None
for subfolder in models_folder.iterdir():
if subfolder.is_dir():
model_name = subfolder.name