SubtitleEdit/subtitleedit · error · Exception

The model file is too small (must be at least 10 MB) - is it

Error message

The model file is too small (must be at least 10 MB) - is it really a whisper.cpp model?

What it means

Thrown by ImportCustomModel when the .bin file exists and has the correct extension but is smaller than 10 MB. Real whisper.cpp GGML models range from ~39 MB (tiny) to ~3 GB (large). A file under 10 MB is almost certainly not a valid model — it could be a truncated download, a placeholder, or a text file renamed to .bin.

Source

Thrown at src/ui/Features/Video/SpeechToText/Engines/WhisperEngineCpp.cs:151

    public bool SupportsCustomModels => true;

    public bool CustomModelIsFolder => false;

    public string ImportCustomModel(string sourcePath)
    {
        if (!File.Exists(sourcePath))
        {
            throw new FileNotFoundException("Model file not found.", sourcePath);
        }

        if (!sourcePath.EndsWith(".bin", StringComparison.OrdinalIgnoreCase))
        {
            throw new Exception("A whisper.cpp model must be a ggml '.bin' file.");
        }

        if (new FileInfo(sourcePath).Length < 10_000_000)
        {
            throw new Exception("The model file is too small (must be at least 10 MB) - is it really a whisper.cpp model?");
        }

        var destination = Path.Combine(GetAndCreateWhisperModelFolder(null), Path.GetFileName(sourcePath));
        File.Copy(sourcePath, destination, true);

        return Path.GetFileNameWithoutExtension(destination);
    }

    public async Task<string> GetHelpText()
    {
        var assetName = $"{StaticName.Replace(" ", string.Empty)}.txt";
        var uri = new Uri($"avares://SubtitleEdit/Assets/SpeechToText/{assetName}");

        await using var stream = AssetLoader.Open(uri);
        using var reader = new StreamReader(stream);

        var contents = await reader.ReadToEndAsync();
        return contents;

View on GitHub (pinned to 17a9f07487)

Solutions

  1. Re-download the model file from the official whisper.cpp GitHub releases and ensure the download completes fully.
  2. If using git to obtain the model, run 'git lfs pull' to fetch the actual binary instead of the LFS pointer.
Defensive patterns

Strategy: validation

Validate before calling

var fileSize = new FileInfo(sourcePath).Length;
if (fileSize < 10_000_000)
    throw new InvalidOperationException($"File is only {fileSize / 1_000_000} MB. whisper.cpp models are at least 39 MB (tiny). The download may be truncated.");

Type guard

static bool IsPlausibleModelSize(string path) =>
    File.Exists(path) && new FileInfo(path).Length >= 10_000_000;

Try / catch

try { var name = engine.ImportCustomModel(sourcePath); }
catch (Exception ex) when (ex.Message.Contains("too small"))
{ /* advise re-download, check for git-LFS pointer, verify file integrity */ }

Prevention

When it happens

Trigger: The model download was interrupted and only a partial file was saved; the user selected a small .bin file that is not a whisper model (e.g. a configuration binary, a game asset); the file is a git-LFS pointer instead of the actual model blob.

Common situations: Interrupted download left a truncated file; git-LFS pointer file (a few hundred bytes) instead of the actual model because LFS wasn't properly pulled; a corrupted download; the user renamed a non-model file to .bin.

Related errors


AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13). Data as JSON: /api/errors/95776d35777cfd7e. Report an issue: GitHub.