xnn.gnn.models.mace_foundation.foundation_to_xnn#
- xnn.gnn.models.mace_foundation.foundation_to_xnn(source, head=None, dtype=None)[source]#
Resolve, load and convert a foundation checkpoint (or model).
The one-call form behind
MACE.from_foundation().- Parameters:
source (str, Path or torch.nn.Module) – Alias / URL / local path of a checkpoint, or an already-loaded
mace-torchmodel.head (str, optional) – Head to keep for multi-head checkpoints.
dtype (torch.dtype or str, optional) – Final dtype;
Nonekeeps the checkpoint’s.
- Returns:
The converted model.
- Return type: