fishaudio/fish-speech · critical · FileNotFoundError
No model weights found in {path_obj}
Error message
No model weights found in {path_obj} What it means
from_pretrained searches the given path for weight files (model.pth, safetensors, etc.); if none is found it raises FileNotFoundError. The directory exists but contains no recognized weights.
Source
Thrown at fish_speech/models/text2semantic/llama.py:585
weights = _remap_fish_qwen3_omni_keys(weights)
elif pth_file.exists():
weights = torch.load(
pth_file,
map_location="cpu",
mmap=True,
weights_only=True,
)
if "state_dict" in weights:
weights = weights["state_dict"]
if weights and next(iter(weights.keys())).startswith("model."):
weights = OrderedDict(
(k.replace("model.", ""), v) for k, v in weights.items()
)
for k in list(weights.keys()):
if "audio_" in k:
weights.pop(k)
else:
raise FileNotFoundError(f"No model weights found in {path_obj}")
err = model.load_state_dict(weights, strict=False, assign=True)
logger.info(f"Model weights loaded - Status: {err}")
if lora_config is not None:
setup_lora(model, lora_config)
logger.info(f"LoRA setup: {lora_config}")
return model
def save_pretrained(self, path: str, drop_lora: bool = False):
path = Path(path)
path.mkdir(parents=True, exist_ok=True)
self.config.save(path / "config.json")
state_dict = self.state_dict()
if drop_lora:View on GitHub (pinned to befe400174)
Solutions
- List the directory and confirm it contains model.pth / *.safetensors
- Re-download the model weights fully
- Point the path at the directory that actually holds the transformer weights (not just config or tokenizer files)
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
def has_weights(p):
p = Path(p)
return any(p.rglob("*.pth")) or any(p.rglob("*.safetensors"))
assert has_weights(model_path) Try / catch
try:
BaseTransformer.from_pretrained(path)
except FileNotFoundError:
re_download_model() Prevention
- Verify weights exist before launch
- Checksum-verify downloads
When it happens
Trigger: Pointing --llama-model-path/--model-path at an empty or incomplete directory, a config-only folder, or a path with only the VQ weights.
Common situations: Interrupted model downloads, extracting a partial archive, or passing the repo root instead of the model subfolder.
Related errors
- {i} is not a file or directory
- Audio file not found: {wav_file_path}
- Unknown model type: {data['model_type']}
- Unknown model type: {config.model_type}
- Reference audio file not found: {ref_audio}
AI-assisted analysis of fishaudio/fish-speech@befe400174 (2026-08-27).
Data as JSON: /api/errors/689f8ae1cf712a65.
Report an issue: GitHub.