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.py for the vocoder models directory (VOC_MODELS_DIRT). The app globs '**/*gan*.pt' to list vocoders (HiFi-GAN etc.) for its dropdown; if the folder is absent the module raises at import time. Note the neighboring code prints the wrong variable (synthesizers) but the raise itself is about vocoders.
Source
Thrown at control/mkgui/app.py:46
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(SYN_MODELS_DIRT):
synthesizers = Enum('synthesizers', list((file.name, file) for file in Path(SYN_MODELS_DIRT).glob("**/*.pt")))
print("Loaded synthesizer models: " + str(len(synthesizers)))
else:
raise Exception(f"Model folder {SYN_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.")
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(synthesizers)))
else:
raise Exception(f"Model folder {VOC_MODELS_DIRT} doesn't exist.")
class Input(BaseModel):
message: str = Field(
..., example="欢迎使用工具箱, 现已支持中文输入!", alias="文本内容"
)
local_audio_file: audio_input_selection = Field(
..., alias="选择语音(本地wav)",
description="选择本地语音文件."
)
record_audio_file: FileContent = Field(default=None, alias="录制语音",
description="录音.", is_recorder=True, mime_type="audio/wav")
upload_audio_file: FileContent = Field(default=None, alias="或上传语音",
description="拖拽或点击上传.", mime_type="audio/wav")
encoder: encoders = Field(
..., alias="编码模型",
description="选择语音编码模型文件."
)View on GitHub (pinned to 28dc5e14f1)
Solutions
- Create the vocoder models directory and place a *gan*.pt checkpoint in it (e.g. hifigan.pt)
- Download the pretrained vocoder weights from the project release and extract to the expected path
- Check VOC_MODELS_DIRT in the config points to the actual vocoder checkpoint location
Example fix
# before: vocoder/saved_models missing mkdir -p vocoder/saved_models cp hifigan_v1.pt vocoder/saved_models/ # after: app import succeeds, vocoders dropdown populated
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 (*gan*.pt) missing in {voc_dir}') Prevention
- Validate model dirs in a health-check endpoint before serving the GUI
- Automate pretrained model download at deploy time
- Name vocoder checkpoints with 'gan' in the filename so the glob matches
When it happens
Trigger: Launching the mkgui app when the vocoder models folder does not exist.
Common situations: HiFi-GAN vocoder weights not downloaded; folder moved or renamed; fresh setup without pretrained assets.
Related errors
- Model folder {VOC_MODELS_DIRT} doesn't exist.
- Model folder {SYN_MODELS_DIRT} doesn't exist. 请将模型文件位置移动到上述位
- Model folder {ENC_MODELS_DIRT} doesn't exist.
- Model folder {EXT_MODELS_DIRT} doesn't exist.
- Model folder {CONV_MODELS_DIRT} doesn't exist.
AI-assisted analysis of babysor/MockingBird@28dc5e14f1 (2026-08-27).
Data as JSON: /api/errors/87045a63a92324be.
Report an issue: GitHub.