Skip to main content

provision

Function provision 

Source
pub fn provision(models_root: &Path) -> Result<PathBuf>
Expand description

Ensure sd-cli is installed under <models_root>/bin/, downloading and extracting the platform’s stable-diffusion.cpp build when it’s missing. Returns the resolved binary path. Idempotent: a binary already present short-circuits the download.

Excluded from coverage: drives a real network download + filesystem extraction. The pure pieces it composes ([asset_name], [download_url], [install_dir], library_path_env) and the full path against a served fake zip are covered by tests.