cjpais/Handy · error · anyhow::Error
Failed to load gigaam model {}: {}
Error message
Failed to load gigaam model {}: {} What it means
Thrown when GigaAMModel::load fails to instantiate the Int8 GigaAM ONNX engine from the model files at model_path. The underlying transcribe-rs/ort error indicates the artifacts could not be turned into a session — missing or truncated files, incompatible artifact version, or an execution-provider/memory failure. Handy attaches the model_id, emits the loading_failed model-state-changed event, and leaves no engine loaded.
Source
Thrown at src-tauri/src/managers/transcription.rs:662
anyhow::anyhow!(error_msg)
})?;
LoadedEngine::MoonshineStreaming(engine)
}
EngineType::SenseVoice => {
let engine =
SenseVoiceModel::load(&model_path, &Quantization::Int8).map_err(|e| {
let error_msg =
format!("Failed to load SenseVoice model {}: {}", model_id, e);
emit_loading_failed(&error_msg);
anyhow::anyhow!(error_msg)
})?;
LoadedEngine::SenseVoice(engine)
}
EngineType::GigaAM => {
let engine = GigaAMModel::load(&model_path, &Quantization::Int8).map_err(|e| {
let error_msg = format!("Failed to load gigaam model {}: {}", model_id, e);
emit_loading_failed(&error_msg);
anyhow::anyhow!(error_msg)
})?;
LoadedEngine::GigaAM(engine)
}
EngineType::Canary => {
let engine = CanaryModel::load(&model_path, &Quantization::Int8).map_err(|e| {
let error_msg = format!("Failed to load canary model {}: {}", model_id, e);
emit_loading_failed(&error_msg);
anyhow::anyhow!(error_msg)
})?;
LoadedEngine::Canary(engine)
}
EngineType::Cohere => {
let engine = CohereModel::load(&model_path, &Quantization::Int8).map_err(|e| {
let error_msg = format!("Failed to load cohere model {}: {}", model_id, e);
emit_loading_failed(&error_msg);
anyhow::anyhow!(error_msg)
})?;
LoadedEngine::Cohere(engine)View on GitHub (pinned to 98a4d80cce)
Solutions
- Remove and re-download the GigaAM model so ModelManager restores complete artifacts
- Check the model directory contents and file sizes against the model registry
- Verify disk space and AV quarantine logs, then retry the download
- Test with another model to confirm the runtime path is otherwise healthy
- Update Handy so bundled runtime and model artifacts match
Example fix
// before
let engine = GigaAMModel::load(&model_path, &Quantization::Int8);
// after — guard the load with a size check and actionable error
let onnx_total: u64 = std::fs::read_dir(&model_path)?
.filter_map(|e| e.ok())
.map(|e| e.metadata().map(|m| m.len()).unwrap_or(0))
.sum();
anyhow::ensure!(onnx_total > 0, "GigaAM artifacts missing in {} — re-download the model", model_path.display());
let engine = GigaAMModel::load(&model_path, &Quantization::Int8)?; Defensive patterns
Strategy: validation
Validate before calling
// Before loading GigaAM, sanity-check the pack size against the registry expectation
let path = model_manager.get_model_path(model_id)?;
let expected = model_manager.get_model_info(model_id).map(|i| i.size_bytes).unwrap_or(0);
let actual: u64 = std::fs::read_dir(&path)?.filter_map(|e| e.ok())
.map(|e| e.metadata().map(|m| m.len()).unwrap_or(0)).sum();
anyhow::ensure!(expected == 0 || actual >= expected, "GigaAM incomplete: {} of {} bytes", actual, expected); Try / catch
match tm.load_model(&model_id) {
Err(e) if e.to_string().contains("Failed to load gigaam model") => {
model_manager.remove_local_model(&model_id)?;
tm.load_model(&model_id)?
}
other => other?,
} Prevention
- Re-download immediately after any interrupted download instead of retrying the load on partial files
- Monitor disk space during model fetches
- Use the model selector's size/hash verification (if available) after downloads
- Keep a known-good fallback model selected for automation paths
When it happens
Trigger: load_model() hits EngineType::GigaAM and GigaAMModel::load(&model_path, &Quantization::Int8) errors: model dir missing the GigaAM .onnx files, partial download, ort provider/dependency missing, or not enough memory to hold the session.
Common situations: Download interrupted by network drop or app exit; disk nearly full; security software removing .onnx files; Handy update bundling a transcribe-rs version whose artifact format changed; small-RAM machines or many GPU apps competing for memory.
Related errors
- Failed to load moonshine model {}: {}
- Failed to load moonshine streaming model {}: {}
- Failed to load SenseVoice model {}: {}
- Failed to load canary model {}: {}
- Failed to load cohere model {}: {}
AI-assisted analysis of cjpais/Handy@98a4d80cce (2026-08-16).
Data as JSON: /api/errors/256e002bb5044ffb.
Report an issue: GitHub.