layaR keeps exported checkpoints in a model root folder with one subfolder
per checkpoint (multilingual/, english/, typed-decisions/). The root
is, in order: the layaR.model_root option, the LAYA_ONNX_ROOT
environment variable (shared with Laya's Rust SDK), or the user cache
folder tools::R_user_dir("layaR", "cache") plus onnx/. Downloads and
imports go there.
Value
laya_model_root() and laya_model_path() return paths (the
latter is where layaR installs checkpoint); laya_model_available()
returns TRUE when a complete export is found in either place.
Details
When a checkpoint isn't in the model root, layaR also looks in the cache
that Laya's other SDKs share (~/.cache/laya/onnx, or
%LOCALAPPDATA%/laya/onnx on Windows), so a model exported or downloaded
for the Rust or TypeScript SDK is reused. layaR never writes there. Set
options(layaR.shared_cache = FALSE) to turn this off.