SubtitleEdit/subtitleedit · error · Exception

A faster-whisper model folder must contain a 'model.bin' fil

Error message

A faster-whisper model folder must contain a 'model.bin' file.

What it means

Thrown by ImportFasterWhisperFolderModel when the source directory exists but does not contain a 'model.bin' file. A valid faster-whisper (CTranslate2) model folder must contain model.bin as its core weight file. Without it, the folder is not a usable faster-whisper model regardless of its other contents.

Source

Thrown at src/ui/Features/Video/SpeechToText/Engines/WhisperEnginePurfviewFasterWhisperXxl.cs:162

    }

    /// <summary>
    /// Validates and copies a faster-whisper model folder (containing model.bin) into the
    /// shared "_models" folder. The destination is normalized to "faster-whisper-&lt;name&gt;" so
    /// both this engine and the CTranslate2 engine (which builds its --model path as
    /// "_models/faster-whisper-&lt;name&gt;") resolve it. Returns the display name (without prefix).
    /// </summary>
    internal static string ImportFasterWhisperFolderModel(string sourceDir, string modelsFolder)
    {
        if (!Directory.Exists(sourceDir))
        {
            throw new DirectoryNotFoundException("Model folder not found: " + sourceDir);
        }

        var modelBin = Path.Combine(sourceDir, "model.bin");
        if (!File.Exists(modelBin))
        {
            throw new Exception("A faster-whisper model folder must contain a 'model.bin' file.");
        }

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

        var sourceName = Path.GetFileName(sourceDir.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar));
        var baseName = sourceName;
        if (baseName.StartsWith("faster-whisper-", StringComparison.OrdinalIgnoreCase))
        {
            baseName = baseName.Substring("faster-whisper-".Length);
        }

        var destFolder = Path.Combine(modelsFolder, "faster-whisper-" + baseName);
        CopyDirectory(sourceDir, destFolder);

        return baseName;

View on GitHub (pinned to 17a9f07487)

Solutions

  1. Open the selected folder in a file manager and verify model.bin is present.
  2. If downloading from Hugging Face, ensure the download completed (model.bin is typically 100+ MB to GBs).
  3. If using git clone, run 'git lfs install && git lfs pull' to fetch model.bin.
  4. Navigate into the correct subfolder — some models nest model.bin inside a 'ctranslate2' or model-name subdirectory.
  5. Re-download the complete model folder from the source repository.
Defensive patterns

Strategy: validation

Validate before calling

var modelBinPath = Path.Combine(sourceDir, "model.bin");
if (!File.Exists(modelBinPath))
    throw new FileNotFoundException($"The selected folder does not contain 'model.bin'. Faster-whisper models must include this file.", modelBinPath);

Type guard

static bool HasModelBin(string dir) =>
    Directory.Exists(dir) && File.Exists(Path.Combine(dir, "model.bin"));

Try / catch

try { var name = WhisperEnginePurfviewFasterWhisperXxl.ImportFasterWhisperFolderModel(sourceDir, modelsFolder); }
catch (Exception ex) when (ex.Message.Contains("model.bin"))
{ /* advise: extract zip fully, check subfolder level, run git lfs pull */ }

Prevention

When it happens

Trigger: The selected folder is a partial download missing model.bin; the folder is a configuration directory from another engine (e.g. WhisperEngineCpp's .bin files, or a Hugging Face repo that hasn't finished downloading); the user selected a parent folder when model.bin is in a subfolder.

Common situations: The model download (e.g. from Hugging Face) was interrupted before model.bin was fetched (it's usually the largest file); the user selected the wrong folder level — model.bin is one directory deeper; the folder is from a different whisper engine format; a git clone without LFS pulled only metadata files.

Related errors


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