babysor/MockingBird · critical · Exception

Model folder {VOC_MODELS_DIRT} doesn't exist.

Error message

Model folder {VOC_MODELS_DIRT} doesn't exist.

What it means

Startup guard in mkgui/app_vc.py for the vocoder models directory (VOC_MODELS_DIRT), globbing '**/*gan*.pt' for vocoder checkpoints. Missing folder aborts the app at import time.

Source

Thrown at control/mkgui/app_vc.py:48

    audio_input_selection = Enum('samples', list((file.name, file) for file in Path(AUDIO_SAMPLES_DIR).glob("*.wav")))
# Pre-Load models
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(VOC_MODELS_DIRT):    
    vocoders =  Enum('vocoders', list((file.name, file) for file in Path(VOC_MODELS_DIRT).glob("**/*gan*.pt")))
    print("Loaded vocoders models: " + str(len(vocoders)))
else:
    raise Exception(f"Model folder {VOC_MODELS_DIRT} doesn't exist.")

class Input(BaseModel):
    local_audio_file: audio_input_selection = Field(
        ..., alias="输入语音(本地wav)",
        description="选择本地语音文件."
    )
    upload_audio_file: FileContent = Field(default=None, alias="或上传语音",
        description="拖拽或点击上传.", mime_type="audio/wav")
    local_audio_file_target: audio_input_selection = Field(
        ..., alias="目标语音(本地wav)",
        description="选择本地语音文件."
    )
    upload_audio_file_target: FileContent = Field(default=None, alias="或上传目标语音",
        description="拖拽或点击上传.", mime_type="audio/wav")
    extractor: extractors = Field(
        ..., alias="编码模型", 
        description="选择语音编码模型文件."
    )

View on GitHub (pinned to 28dc5e14f1)

Solutions

  1. Create the vocoder models folder and place a *gan*.pt checkpoint inside
  2. Download the pretrained vocoder and extract to the expected path
  3. Verify VOC_MODELS_DIRT in the config

Example fix

# before: vocoder/saved_models missing
mkdir -p vocoder/saved_models
cp hifigan_v1.pt vocoder/saved_models/
# after: app import succeeds
Defensive patterns

Strategy: validation

Validate before calling

voc_dir = Path(VOC_MODELS_DIRT)
if not voc_dir.is_dir() or not list(voc_dir.glob('**/*gan*.pt')):
    raise SystemExit(f'Vocoder missing in {voc_dir}')

Prevention

When it happens

Trigger: Starting the VC GUI when the vocoder models directory does not exist.

Common situations: Vocoder weights not downloaded for the VC pipeline; directory moved; models bundle extracted into a different root.

Related errors


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