SubtitleEdit/subtitleedit · error · InvalidOperationException
No llama.cpp translate model found in {LlamaCppServerManager
Error message
No llama.cpp translate model found in {LlamaCppServerManager.GetAndCreateModelsFolder()}. Download one in Subtitle Edit (Auto-translate > llama.cpp), drop a .gguf into that folder, or pass --translate-model:<path.gguf>. What it means
InvalidOperationException from ResolveLlamaCppModel when NO --translate-model was given AND none of the curated/custom models in the models folder report IsModelInstalled. This is the 'pick a sensible default' fallback failing because nothing is installed.
Source
Thrown at src/seconv/Core/AutoTranslateRunner.cs:248
var model = all.FirstOrDefault(m => m.FileName.Equals(name, StringComparison.OrdinalIgnoreCase))
?? all.FirstOrDefault(m => m.FileName.Equals(name + ".gguf", StringComparison.OrdinalIgnoreCase))
?? all.FirstOrDefault(m => m.DisplayName.Equals(name, StringComparison.OrdinalIgnoreCase));
if (model == null || !LlamaCppServerManager.IsModelInstalled(model))
{
throw new InvalidOperationException(
$"Translate model '{name}' not found in {LlamaCppServerManager.GetAndCreateModelsFolder()}. " +
"Download one in Subtitle Edit (Auto-translate > llama.cpp), drop a .gguf into that folder, " +
"or pass a full path via --translate-model.");
}
return model;
}
// No model given: pick the first installed translate model (curated order, then custom).
var installed = LlamaCppServerManager.GetAllTranslateModels().FirstOrDefault(LlamaCppServerManager.IsModelInstalled);
if (installed == null)
{
throw new InvalidOperationException(
$"No llama.cpp translate model found in {LlamaCppServerManager.GetAndCreateModelsFolder()}. " +
"Download one in Subtitle Edit (Auto-translate > llama.cpp), drop a .gguf into that folder, " +
"or pass --translate-model:<path.gguf>.");
}
return installed;
}
}
View on GitHub (pinned to 17a9f07487)
Solutions
- Pass --translate-model:<path.gguf> pointing at any installed model.
- Open SE GUI > Auto-translate > llama.cpp and download a curated translate model (this populates the folder).
- Manually place any chat-capable .gguf into the folder printed in the message.
Example fix
// before
var installed = LlamaCppServerManager.GetAllTranslateModels().FirstOrDefault(LlamaCppServerManager.IsModelInstalled);
if (installed == null) throw new InvalidOperationException(...);
// after — same, but hint at a known-good default model name in the message
throw new InvalidOperationException($"No llama.cpp translate model in {folder}. Try `--translate-model:gemma-9b-it` after downloading, or pass a path."); Defensive patterns
Strategy: validation
Validate before calling
var installed = LlamaCppServerManager.GetAllTranslateModels().Where(LlamaCppServerManager.IsModelInstalled).ToList();
if (installed.Count == 0 && string.IsNullOrWhiteSpace(requestedModel))
throw new InvalidOperationException("No translate model installed. Download one in SE GUI or pass --translate-model:<path>."); Type guard
static bool AnyTranslateModelInstalled() => LlamaCppServerManager.GetAllTranslateModels().Any(LlamaCppServerManager.IsModelInstalled);
Try / catch
null
Prevention
- Ship a setup step that downloads a default curated model on first run.
- Detect 'no model installed' early in CLI startup and print install guidance.
When it happens
Trigger: First-time use of llamacpp translate on a machine with no .gguf in GetAndCreateModelsFolder(). The default-selection logic (FirstOrDefault(IsModelInstalled)) returns null and throws.
Common situations: Fresh install of the seconv CLI with no prior SE GUI use; models folder cleaned/emptied; user switched machines without copying models.
Related errors
- Translate model '{name}' not found in {LlamaCppServerManager
- Translate model file not found: {name}
- llama.cpp model not found - please download a model first.
- Translate engine '{options.TranslateEngine}' is not supporte
- llama-server executable not found - please download llama.cp
AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13).
Data as JSON: /api/errors/59b274090284345a.
Report an issue: GitHub.