CorentinJ/Real-Time-Voice-Cloning · critical · Exception
No synthesizer models found in %s
Error message
No synthesizer models found in %s
What it means
Raised by Ui.populate_models (toolbox/ui.py) when models_dir.glob("*/synthesizer.pt") finds no match. Unlike the encoder (hard requirement, error 8) and the vocoder (optional, falls back to Griffin-Lim), the synthesizer has no built-in fallback, so the toolbox aborts when it cannot find <models_dir>/<name>/synthesizer.pt.
Source
Thrown at toolbox/ui.py:344
@property
def current_synthesizer_fpath(self):
return self.synthesizer_box.itemData(self.synthesizer_box.currentIndex())
@property
def current_vocoder_fpath(self):
return self.vocoder_box.itemData(self.vocoder_box.currentIndex())
def populate_models(self, models_dir: Path):
# Encoder
encoder_fpaths = list(models_dir.glob("*/encoder.pt"))
if len(encoder_fpaths) == 0:
raise Exception("No encoder models found in %s" % models_dir)
self.repopulate_box(self.encoder_box, [(f.parent.name, f) for f in encoder_fpaths])
# Synthesizer
synthesizer_fpaths = list(models_dir.glob("*/synthesizer.pt"))
if len(synthesizer_fpaths) == 0:
raise Exception("No synthesizer models found in %s" % models_dir)
self.repopulate_box(self.synthesizer_box, [(f.parent.name, f) for f in synthesizer_fpaths])
# Vocoder
vocoder_fpaths = list(models_dir.glob("*/vocoder.pt"))
vocoder_items = [(f.parent.name, f) for f in vocoder_fpaths] + [("Griffin-Lim", None)]
self.repopulate_box(self.vocoder_box, vocoder_items)
@property
def selected_utterance(self):
return self.utterance_history.itemData(self.utterance_history.currentIndex())
def register_utterance(self, utterance: Utterance):
self.utterance_history.blockSignals(True)
self.utterance_history.insertItem(0, utterance.name, utterance)
self.utterance_history.setCurrentIndex(0)
self.utterance_history.blockSignals(False)
if len(self.utterance_history) > self.max_saved_utterances:View on GitHub (pinned to 890f3a0318)
Solutions
- Download the pretrained synthesizer and place it at <models_dir>/<model_name>/synthesizer.pt.
- Confirm the glob matches: ls <models_dir>/*/synthesizer.pt — at least one result is required.
- If you only meant to use the encoder, note the toolbox cannot start without a synthesizer; use demo_cli.py-style flows or place the pretrained synthesizer.
Example fix
# before python demo_toolbox.py -m ~/models # ~/models has encoder.pt but no */synthesizer.pt -> raises # after mkdir -p ~/models/pretrained && mv ~/Downloads/synthesizer.pt ~/models/pretrained/ python demo_toolbox.py -m ~/models
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
def synthesizer_model_present(models_dir: Path) -> bool:
return any(models_dir.glob("*/synthesizer.pt")) Try / catch
try:
ui.populate_models(models_dir)
except Exception as e:
if "synthesizer models" in str(e):
raise SystemExit(f"Missing synthesizer: place <models>/<name>/synthesizer.pt") from e
raise Prevention
- Preflight both globs ('*/encoder.pt', '*/synthesizer.pt') before launching demo_toolbox.py.
- Store all three model files under one named run directory so partial downloads are obvious.
- Document the exact expected tree in your team's setup notes to avoid one-level-off placement mistakes.
When it happens
Trigger: Launching demo_toolbox.py where the models root has an encoder.pt but no synthesizer.pt in any subdirectory: synthesizer never downloaded, or the -m argument points at a dir containing only encoder/vocoder checkpoints.
Common situations: Downloading only the pretrained encoder initially; copying synthesizer.pt to the wrong nesting level (must be one subdirectory deep); mixing models from different roots after a directory reorganization.
Related errors
- No encoder models found in %s
- No speakers found. Make sure you are pointing to the directo
- Model was not loaded. Call load_model() before inference.
- No visdom server detected. Run the command \"visdom\" in you
- `hparams.synthesis_batch_size` must be evenly divisible by n
AI-assisted analysis of CorentinJ/Real-Time-Voice-Cloning@890f3a0318 (2026-08-15).
Data as JSON: /api/errors/d160d81e923c9481.
Report an issue: GitHub.