babysor/MockingBird · critical · Exception

Model folder {CONV_MODELS_DIRT} doesn't exist.

Error message

Model folder {CONV_MODELS_DIRT} doesn't exist.

What it means

Import-time guard in mkgui/train_vc.py for the convertor models directory (CONV_MODELS_DIRT), which must contain .pth convertor checkpoints; absent folder aborts module import.

Source

Thrown at control/mkgui/train_vc.py:27

import torch

# Constants
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"


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(CONV_MODELS_DIRT):    
    convertors =  Enum('convertors', list((file.name, file) for file in Path(CONV_MODELS_DIRT).glob("**/*.pth")))
    print("Loaded convertor models: " + str(len(convertors)))
else:
    raise Exception(f"Model folder {CONV_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 convertor models directory and copy the .pth checkpoint in
  2. Train or download the ppg2mel convertor to the expected path
  3. Confirm CONV_MODELS_DIRT configuration

Example fix

# before: convertor/saved_models missing
mkdir -p convertor/saved_models && cp ppg2mel.pth convertor/saved_models/
# after: 'Loaded convertor models: 1', page loads
Defensive patterns

Strategy: validation

Validate before calling

conv_dir = Path(CONV_MODELS_DIRT)
if not conv_dir.is_dir() or not list(conv_dir.glob('**/*.pth')):
    raise SystemExit(f'Convertor models missing in {conv_dir}')

Prevention

When it happens

Trigger: Opening the VC training page when the convertor models folder does not exist.

Common situations: ppg2mel convertor not trained/downloaded; checkpoints saved under another root; wrong file extension.

Related errors


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