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

  1. List the directory and confirm it contains model.pth / *.safetensors
  2. Re-download the model weights fully
  3. 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

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


AI-assisted analysis of fishaudio/fish-speech@befe400174 (2026-08-27). Data as JSON: /api/errors/689f8ae1cf712a65. Report an issue: GitHub.