{"record":{"id":"888b6dac161c0deb","repo":"babysor/MockingBird","slug":"model-folder-conv-models-dirt-doesn-t-exist-888b6d","errorCode":null,"errorMessage":"Model folder {CONV_MODELS_DIRT} doesn't exist.","messagePattern":"Model folder (.+?) doesn't exist\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"critical","filePath":"control/mkgui/train_vc.py","lineNumber":27,"sourceCode":"import torch\n\n# Constants\nEXT_MODELS_DIRT = f\"data{os.sep}ckpt{os.sep}ppg_extractor\"\nCONV_MODELS_DIRT = f\"data{os.sep}ckpt{os.sep}ppg2mel\"\nENC_MODELS_DIRT = f\"data{os.sep}ckpt{os.sep}encoder\"\n\n\nif os.path.isdir(EXT_MODELS_DIRT):    \n    extractors =  Enum('extractors', list((file.name, file) for file in Path(EXT_MODELS_DIRT).glob(\"**/*.pt\")))\n    print(\"Loaded extractor models: \" + str(len(extractors)))\nelse:\n    raise Exception(f\"Model folder {EXT_MODELS_DIRT} doesn't exist.\")\n\nif os.path.isdir(CONV_MODELS_DIRT):    \n    convertors =  Enum('convertors', list((file.name, file) for file in Path(CONV_MODELS_DIRT).glob(\"**/*.pth\")))\n    print(\"Loaded convertor models: \" + str(len(convertors)))\nelse:\n    raise Exception(f\"Model folder {CONV_MODELS_DIRT} doesn't exist.\")\n\nif os.path.isdir(ENC_MODELS_DIRT):    \n    encoders = Enum('encoders', list((file.name, file) for file in Path(ENC_MODELS_DIRT).glob(\"**/*.pt\")))\n    print(\"Loaded encoders models: \" + str(len(encoders)))\nelse:\n    raise Exception(f\"Model folder {ENC_MODELS_DIRT} doesn't exist.\")\n\nclass Model(str, Enum):\n    VC_PPG2MEL = \"ppg2mel\"\n\nclass Dataset(str, Enum):\n    AIDATATANG_200ZH = \"aidatatang_200zh\"\n    AIDATATANG_200ZH_S = \"aidatatang_200zh_s\"\n\nclass Input(BaseModel):\n    # def render_input_ui(st, input) -> Dict: \n    #     input[\"selected_dataset\"] = st.selectbox(\n    #         '选择数据集', ","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/babysor/MockingBird/blob/28dc5e14f12d7c754612af2fde8e78a4b03f8616/control/mkgui/train_vc.py#L9-L45","documentation":"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.","triggerScenarios":"Opening the VC training page when the convertor models folder does not exist.","commonSituations":"ppg2mel convertor not trained/downloaded; checkpoints saved under another root; wrong file extension.","solutions":["Create the convertor models directory and copy the .pth checkpoint in","Train or download the ppg2mel convertor to the expected path","Confirm CONV_MODELS_DIRT configuration"],"exampleFix":"# before: convertor/saved_models missing\nmkdir -p convertor/saved_models && cp ppg2mel.pth convertor/saved_models/\n# after: 'Loaded convertor models: 1', page loads","handlingStrategy":"validation","validationCode":"conv_dir = Path(CONV_MODELS_DIRT)\nif not conv_dir.is_dir() or not list(conv_dir.glob('**/*.pth')):\n    raise SystemExit(f'Convertor models missing in {conv_dir}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Save convertors as .pth matching the glob","Verify model dirs in a startup script","Centralize model path constants"],"tags":["python","models","filesystem","mkgui","voice-conversion","training"],"backgroundTag":"missing-model-directory","analyzedSha":"28dc5e14f12d7c754612af2fde8e78a4b03f8616","analyzedAt":"2026-08-27T02:26:53.589Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}