babysor/MockingBird · critical · Exception

Model folder {EXT_MODELS_DIRT} doesn't exist.

Error message

Model folder {EXT_MODELS_DIRT} doesn't exist.

What it means

Import-time guard in mkgui/preprocess.py: the preprocessing page requires an extractor models directory (EXT_MODELS_DIRT) containing .pt files to build its extractors dropdown; absence raises immediately when the module loads.

Source

Thrown at control/mkgui/preprocess.py:17

from pydantic import BaseModel, Field
import os
from pathlib import Path
from enum import Enum
from typing import Any, Tuple


# Constants
EXT_MODELS_DIRT = f"data{os.sep}ckpt{os.sep}ppg_extractor"
ENC_MODELS_DIRT = f"data{os.sep}ckpt{os.sep}encoder"


if os.path.isdir(EXT_MODELS_DIRT):    
    extractors =  Enum('extractors', list((file.name, file) for file in Path(EXT_MODELS_DIRT).glob("**/*.pt")))
    print("Loaded extractor models: " + str(len(extractors)))
else:
    raise Exception(f"Model folder {EXT_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):
    VC_PPG2MEL = "ppg2mel"

class Dataset(str, Enum):
    AIDATATANG_200ZH = "aidatatang_200zh"
    AIDATATANG_200ZH_S = "aidatatang_200zh_s"

class Input(BaseModel):
    # def render_input_ui(st, input) -> Dict: 
    #     input["selected_dataset"] = st.selectbox(
    #         '选择数据集', 

View on GitHub (pinned to 28dc5e14f1)

Solutions

  1. Create the extractor models directory and add an extractor .pt checkpoint
  2. Download pretrained extractor weights to the expected path
  3. Check EXT_MODELS_DIRT configuration

Example fix

# before: extractor/saved_models missing
mkdir -p extractor/saved_models && cp extractor.pt extractor/saved_models/
# after: module imports, 'Loaded extractor models: 1'
Defensive patterns

Strategy: validation

Validate before calling

ext_dir = Path(EXT_MODELS_DIRT)
if not ext_dir.is_dir() or not list(ext_dir.glob('**/*.pt')):
    raise SystemExit(f'Extractor models missing in {ext_dir}')

Prevention

When it happens

Trigger: Opening the mkgui preprocessing page (or importing preprocess.py) with no extractor models directory present.

Common situations: Running preprocessing before any extractor model was trained/downloaded; misconfigured models root path.

Related errors


AI-assisted analysis of babysor/MockingBird@28dc5e14f1 (2026-08-27). Data as JSON: /api/errors/4425c0619efc66d8. Report an issue: GitHub.