babysor/MockingBird · critical · Exception
No encoder models found in %s
Error message
No encoder models found in %s
What it means
Raised by the Toolbox UI when populating model dropdowns: the encoder models directory contains zero *.pt files. Unlike the mkgui guards this triggers even when the folder exists but is empty, and it hard-crashes the toolbox (called from reset_ui at startup).
Source
Thrown at control/toolbox/ui.py:343
@property
def current_vocoder_fpath(self):
return self.vocoder_box.itemData(self.vocoder_box.currentIndex())
@property
def current_extractor_fpath(self):
return self.extractor_box.itemData(self.extractor_box.currentIndex())
@property
def current_convertor_fpath(self):
return self.convertor_box.itemData(self.convertor_box.currentIndex())
def populate_models(self, encoder_models_dir: Path, synthesizer_models_dir: Path,
vocoder_models_dir: Path, extractor_models_dir: Path, convertor_models_dir: Path, vc_mode: bool):
# Encoder
encoder_fpaths = list(encoder_models_dir.glob("*.pt"))
if len(encoder_fpaths) == 0:
raise Exception("No encoder models found in %s" % encoder_models_dir)
self.repopulate_box(self.encoder_box, [(f.stem, f) for f in encoder_fpaths])
if vc_mode:
# Extractor
extractor_fpaths = list(extractor_models_dir.glob("*.pt"))
if len(extractor_fpaths) == 0:
self.log("No extractor models found in %s" % extractor_fpaths)
self.repopulate_box(self.extractor_box, [(f.stem, f) for f in extractor_fpaths])
# Convertor
convertor_fpaths = list(convertor_models_dir.glob("*.pth"))
if len(convertor_fpaths) == 0:
self.log("No convertor models found in %s" % convertor_fpaths)
self.repopulate_box(self.convertor_box, [(f.stem, f) for f in convertor_fpaths])
else:
# Synthesizer
synthesizer_fpaths = list(synthesizer_models_dir.glob("**/*.pt"))
if len(synthesizer_fpaths) == 0:View on GitHub (pinned to 28dc5e14f1)
Solutions
- Put at least one encoder .pt checkpoint directly in the encoder models directory
- Re-check the 'models directory' setting in the Toolbox UI / config and point it at the folder that actually contains encoder .pt files
- Re-extract the pretrained models archive, preserving directory structure
Example fix
# before: encoder models dir empty cp ~/Downloads/encoder.pt /path/to/encoder/saved_models/ # after: toolbox starts, encoder dropdown lists 'encoder'
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
def has_models(d: Path, pattern: str = '*.pt') -> bool:
return d.is_dir() and len(list(d.glob(pattern))) > 0
assert has_models(encoder_models_dir), f'No encoder .pt files in {encoder_models_dir}' Try / catch
try:
ui.populate_models(...)
except Exception as e:
show_dialog(str(e)); sys.exit(1) # keep toolbox from hard-crashing silently Prevention
- Verify each models dir contains matching files before launching the toolbox
- Keep checkpoints at the exact glob depth the UI expects (*.pt directly in dir)
- Ship a setup script that validates the models tree
When it happens
Trigger: Starting the Toolbox (in normal or VC mode) with an encoder models directory that exists but has no .pt checkpoints (or pointing at the wrong directory).
Common situations: User downloaded models but left checkpoints in Downloads/zip; models placed one level too deep or with wrong extension; folder created but empty.
Related errors
- No synthesizer models found in %s
- Model folder {SYN_MODELS_DIRT} doesn't exist. 请将模型文件位置移动到上述位
- Model folder {ENC_MODELS_DIRT} doesn't exist.
- Model folder {VOC_MODELS_DIRT} doesn't exist.
- Model folder {EXT_MODELS_DIRT} doesn't exist.
AI-assisted analysis of babysor/MockingBird@28dc5e14f1 (2026-08-27).
Data as JSON: /api/errors/2e70bd5de2aba4b3.
Report an issue: GitHub.