{"record":{"id":"c8dba0460558f695","repo":"SubtitleEdit/subtitleedit","slug":"the-model-bin-file-is-too-small-must-be-at-leas","errorCode":null,"errorMessage":"The 'model.bin' file is too small (must be at least 10 MB) - is it really a faster-whisper model?","messagePattern":"The 'model\\.bin' file is too small \\(must be at least 10 MB\\) - is it really a faster-whisper model\\?","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/ui/Features/Video/SpeechToText/Engines/WhisperEnginePurfviewFasterWhisperXxl.cs","lineNumber":167,"sourceCode":"    /// both this engine and the CTranslate2 engine (which builds its --model path as\n    /// \"_models/faster-whisper-&lt;name&gt;\") resolve it. Returns the display name (without prefix).\n    /// </summary>\n    internal static string ImportFasterWhisperFolderModel(string sourceDir, string modelsFolder)\n    {\n        if (!Directory.Exists(sourceDir))\n        {\n            throw new DirectoryNotFoundException(\"Model folder not found: \" + sourceDir);\n        }\n\n        var modelBin = Path.Combine(sourceDir, \"model.bin\");\n        if (!File.Exists(modelBin))\n        {\n            throw new Exception(\"A faster-whisper model folder must contain a 'model.bin' file.\");\n        }\n\n        if (new FileInfo(modelBin).Length < 10_000_000)\n        {\n            throw new Exception(\"The 'model.bin' file is too small (must be at least 10 MB) - is it really a faster-whisper model?\");\n        }\n\n        var sourceName = Path.GetFileName(sourceDir.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar));\n        var baseName = sourceName;\n        if (baseName.StartsWith(\"faster-whisper-\", StringComparison.OrdinalIgnoreCase))\n        {\n            baseName = baseName.Substring(\"faster-whisper-\".Length);\n        }\n\n        var destFolder = Path.Combine(modelsFolder, \"faster-whisper-\" + baseName);\n        CopyDirectory(sourceDir, destFolder);\n\n        return baseName;\n    }\n\n    private static void CopyDirectory(string sourceDir, string destDir)\n    {\n        Directory.CreateDirectory(destDir);","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/ui/Features/Video/SpeechToText/Engines/WhisperEnginePurfviewFasterWhisperXxl.cs#L149-L185","documentation":"Validates that a folder selected as a faster-whisper (CTranslate2) model contains a 'model.bin' of at least 10 MB. A real faster-whisper export's model.bin is typically hundreds of MB; anything smaller almost always means the folder is not a genuine CTranslate2 model. The check runs after confirming the file exists but before copying the folder into the managed models directory.","triggerScenarios":"Selecting a sourceDir whose model.bin is < 10_000_000 bytes during faster-whisper model import/copy. Triggered by CopyDirectory flow when the user picks an invalid model folder.","commonSituations":"Git LFS pointer file left in place of model.bin (cloned a HF repo without `git lfs pull`); interrupted/partial download; user pointed at a folder of original OpenAI Whisper weights (model.pt) instead of a CTranslate2 conversion; selected a parent directory holding multiple models rather than a single leaf model.","solutions":["Re-download the model from a verified faster-whisper source (e.g. HuggingFace 'Systran/faster-whisper-*') so model.bin is hundreds of MB.","Confirm sourceDir is the leaf model directory that directly contains model.bin, not a parent folder.","If you cloned a HF repo, run `git lfs pull` in it, or download a zip release instead of cloning.","Pre-check the size: `new FileInfo(modelBin).Length` before selecting the folder."],"exampleFix":"// before: select any folder with a tiny model.bin -> throws\n// after: validate before offering the folder to the engine\nvar modelBin = Path.Combine(sourceDir, \"model.bin\");\nif (!File.Exists(modelBin) || new FileInfo(modelBin).Length < 10_000_000)\n{\n    // do not list this folder as an importable model\n    continue;\n}","handlingStrategy":"validation","validationCode":"var modelBin = Path.Combine(sourceDir, \"model.bin\");\nif (!File.Exists(modelBin)) return Invalid(\"model.bin missing\");\nif (new FileInfo(modelBin).Length < 10_000_000) return Invalid(\"model.bin too small\");\nreturn Ok();","typeGuard":null,"tryCatchPattern":"try { engine.ImportModel(sourceDir); }\ncatch (Exception ex) when (ex.Message.Contains(\"too small\"))\n{ /* prompt user to pick a complete faster-whisper folder */ }","preventionTips":["Only offer folders for import whose model.bin is >= 10 MB.","Prefer downloading a verified zip release over git-cloning a model repo.","Run `git lfs pull` after cloning any HuggingFace model repo before importing."],"tags":["faster-whisper","model-validation","file-size","speech-to-text"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}