{"record":{"id":"d6033ade7fe46dee","repo":"babysor/MockingBird","slug":"model-folder-ext-models-dirt-doesn-t-exist","errorCode":null,"errorMessage":"Model folder {EXT_MODELS_DIRT} doesn't exist.","messagePattern":"Model folder (.+?) doesn't exist\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"critical","filePath":"control/mkgui/app_vc.py","lineNumber":36,"sourceCode":"\n# Constants\nAUDIO_SAMPLES_DIR = f'data{os.sep}samples{os.sep}'\nEXT_MODELS_DIRT = f'data{os.sep}ckpt{os.sep}ppg_extractor'\nCONV_MODELS_DIRT = f'data{os.sep}ckpt{os.sep}ppg2mel'\nVOC_MODELS_DIRT = f'data{os.sep}ckpt{os.sep}vocoder'\nTEMP_SOURCE_AUDIO = f'wavs{os.sep}temp_source.wav'\nTEMP_TARGET_AUDIO = f'wavs{os.sep}temp_target.wav'\nTEMP_RESULT_AUDIO = f'wavs{os.sep}temp_result.wav'\n\n# Load local sample audio as options TODO: load dataset \nif os.path.isdir(AUDIO_SAMPLES_DIR):\n    audio_input_selection = Enum('samples', list((file.name, file) for file in Path(AUDIO_SAMPLES_DIR).glob(\"*.wav\")))\n# Pre-Load models\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(VOC_MODELS_DIRT):    \n    vocoders =  Enum('vocoders', list((file.name, file) for file in Path(VOC_MODELS_DIRT).glob(\"**/*gan*.pt\")))\n    print(\"Loaded vocoders models: \" + str(len(vocoders)))\nelse:\n    raise Exception(f\"Model folder {VOC_MODELS_DIRT} doesn't exist.\")\n\nclass Input(BaseModel):\n    local_audio_file: audio_input_selection = Field(\n        ..., alias=\"输入语音（本地wav）\",\n        description=\"选择本地语音文件.\"\n    )","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/babysor/MockingBird/blob/28dc5e14f12d7c754612af2fde8e78a4b03f8616/control/mkgui/app_vc.py#L18-L54","documentation":"Startup guard in the voice-conversion GUI (mkgui/app_vc.py) for the extractor models directory (EXT_MODELS_DIRT). The module builds an extractors Enum from '**/*.pt' files under that folder at import time; an absent folder aborts app startup.","triggerScenarios":"Starting app_vc.py without a trained/downloaded PPG extractor model directory at the expected path.","commonSituations":"Voice-conversion pretrained models not downloaded; fresh clone; models stored under a different root than the config constant.","solutions":["Create the extractor models directory and put at least one .pt extractor checkpoint in it","Download the pretrained VC model bundle and extract it into the expected location","Verify EXT_MODELS_DIRT in config matches your checkpoint layout"],"exampleFix":"# before: extractor/saved_models missing\nmkdir -p extractor/saved_models\ncp extractor.pt extractor/saved_models/\n# after: 'Loaded extractor models: 1' and app starts","handlingStrategy":"validation","validationCode":"ext_dir = Path(EXT_MODELS_DIRT)\nif not ext_dir.is_dir() or not list(ext_dir.glob('**/*.pt')):\n    raise SystemExit(f'Extractor models missing in {ext_dir}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Preflight-check VC model directories before starting app_vc","Bundle pretrained extractor weights with deployment","Centralize model path constants in one config"],"tags":["python","models","filesystem","mkgui","voice-conversion","startup"],"backgroundTag":"missing-model-directory","analyzedSha":"28dc5e14f12d7c754612af2fde8e78a4b03f8616","analyzedAt":"2026-08-27T02:26:53.589Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}