{"record":{"id":"1f280790a58598f2","repo":"babysor/MockingBird","slug":"model-folder-conv-models-dirt-doesn-t-exist","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/app_vc.py","lineNumber":42,"sourceCode":"TEMP_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    )\n    upload_audio_file: FileContent = Field(default=None, alias=\"或上传语音\",\n        description=\"拖拽或点击上传.\", mime_type=\"audio/wav\")\n    local_audio_file_target: audio_input_selection = Field(\n        ..., alias=\"目标语音（本地wav）\",\n        description=\"选择本地语音文件.\"\n    )","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/babysor/MockingBird/blob/28dc5e14f12d7c754612af2fde8e78a4b03f8616/control/mkgui/app_vc.py#L24-L60","documentation":"Startup guard in mkgui/app_vc.py for the convertor models directory (CONV_MODELS_DIRT). Unlike other model types it globs '**/*.pth' (ppg2mel convertors are saved as .pth). A missing folder raises at import time because the convertors dropdown cannot be built.","triggerScenarios":"Starting app_vc.py when the convertor models folder does not exist or has no .pth checkpoints.","commonSituations":"ppg2mel convertor not trained yet; checkpoints saved elsewhere; extension mismatch (.pt vs .pth).","solutions":["Create the convertor models directory and copy the .pth convertor checkpoint into it","Train the ppg2mel convertor or download the pretrained one to the expected path","Confirm CONV_MODELS_DIRT points to the right directory and your file ends in .pth"],"exampleFix":"# before: convertor/saved_models missing\nmkdir -p convertor/saved_models\ncp ppg2mel_*.pth convertor/saved_models/\n# after: 'Loaded convertor models: 1' and app starts","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 (.pth) models missing in {conv_dir}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Save convertor checkpoints as .pth to match the glob","Verify model dirs in a startup health check","Document expected VC models layout"],"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"}