pub fn prefetch_with_progress(
id: &str,
on_progress: &mut dyn FnMut(&str, u64, u64),
) -> Result<(), String>Expand description
Pre-fetch (download + cache) all of a model’s weight files, reporting per-file
progress via on_progress(file_name, downloaded_bytes, total_bytes).
Intended for hosts (e.g. QSMxT) that want to show a download bar before running
inference: call this first, then the normal primary_weight/weights path finds the
cached files and does no further network I/O. Files already present (cache or
$QSM_MODEL_DIR) are skipped silently. Unknown id (a non-model / classical
algorithm) is a no-op — returns Ok(()) so callers can invoke it unconditionally.