babysor/MockingBird · critical · Exception
Model folder {ENC_MODELS_DIRT} doesn't exist.
Error message
Model folder {ENC_MODELS_DIRT} doesn't exist. What it means
Import-time guard in mkgui/train.py for the encoder models directory (ENC_MODELS_DIRT). The training page needs encoder checkpoints listed for its dropdown; absent folder raises at import.
Source
Thrown at control/mkgui/train.py:29
ENC_MODELS_DIRT = f"data{os.sep}ckpt{os.sep}encoder"
# EXT_MODELS_DIRT = f"data{os.sep}ckpt{os.sep}ppg_extractor"
# CONV_MODELS_DIRT = f"data{os.sep}ckpt{os.sep}ppg2mel"
# ENC_MODELS_DIRT = f"data{os.sep}ckpt{os.sep}encoder"
# Pre-Load models
if os.path.isdir(SYN_MODELS_DIRT):
synthesizers = Enum('synthesizers', list((file.name, file) for file in Path(SYN_MODELS_DIRT).glob("**/*.pt")))
print("Loaded synthesizer models: " + str(len(synthesizers)))
else:
raise Exception(f"Model folder {SYN_MODELS_DIRT} doesn't exist.")
if os.path.isdir(ENC_MODELS_DIRT):
encoders = Enum('encoders', list((file.name, file) for file in Path(ENC_MODELS_DIRT).glob("**/*.pt")))
print("Loaded encoders models: " + str(len(encoders)))
else:
raise Exception(f"Model folder {ENC_MODELS_DIRT} doesn't exist.")
class Model(str, Enum):
DEFAULT = "default"
class Input(BaseModel):
model: Model = Field(
Model.DEFAULT, title="模型类型",
)
# datasets_root: str = Field(
# ..., alias="预处理数据根目录", description="输入目录(相对/绝对),不适用于ppg2mel模型",
# format=True,
# example="..\\trainning_data\\"
# )
input_root: str = Field(
..., alias="输入目录", description="预处理数据根目录",
format=True,
example=f"..{os.sep}audiodata{os.sep}SV2TTS{os.sep}synthesizer"
)View on GitHub (pinned to 28dc5e14f1)
Solutions
- Create the encoder models directory and place the encoder .pt checkpoint in it
- Download pretrained models to the expected location
- Check ENC_MODELS_DIRT configuration
Example fix
# before: encoder/saved_models missing mkdir -p encoder/saved_models && cp encoder.pt encoder/saved_models/ # after: 'Loaded encoders models: 1', training page loads
Defensive patterns
Strategy: validation
Validate before calling
enc_dir = Path(ENC_MODELS_DIRT)
if not enc_dir.is_dir() or not list(enc_dir.glob('*.pt')):
raise SystemExit(f'Encoder models missing in {enc_dir}') Prevention
- Preflight-check model directories before launching training UI
- Bundle pretrained encoder weights
- Centralize model path config
When it happens
Trigger: Loading the mkgui training page with no encoder models directory.
Common situations: Pretrained encoder weights not present; wrong models root in config; first run after clone.
Related errors
- Model folder {SYN_MODELS_DIRT} doesn't exist.
- Model folder {EXT_MODELS_DIRT} doesn't exist.
- Model folder {CONV_MODELS_DIRT} doesn't exist.
- Model folder {ENC_MODELS_DIRT} doesn't exist.
- Model folder {SYN_MODELS_DIRT} doesn't exist. 请将模型文件位置移动到上述位
AI-assisted analysis of babysor/MockingBird@28dc5e14f1 (2026-08-27).
Data as JSON: /api/errors/c70ca8b3a978131d.
Report an issue: GitHub.