Add config.json existing check

This commit is contained in:
litagin02
2024-02-23 16:18:33 +09:00
parent e16cdad6e9
commit deb9190e09

View File

@@ -234,6 +234,12 @@ class ModelHolder:
if len(model_files) == 0:
logger.warning(f"No model files found in {model_dir}, so skip it")
continue
config_path = model_dir / "config.json"
if not config_path.exists():
logger.warning(
f"Config file {config_path} not found, so skip {model_dir}"
)
continue
self.model_files_dict[model_dir.name] = model_files
self.model_names.append(model_dir.name)