DA3-LARGE · CoreAI (.aimodel)

Depth Anything 3 (DA3-LARGE) any-view depth model (ViT-L backbone), converted to Apple's CoreAI .aimodel format (macOS 27 / iOS 27+, device only — no simulator). Single-image input (N=1).

Converted with coreai_torch 0.4.2 / torch 2.14 via torch.export → run_decompositions → TorchConverter → optimize → save_asset. Two precision builds: fp32 (1.35 GB) and fp16 (677.8 MB, half-precision compute with fp32 IO).

IO contract

  • Function: main
  • Input: image — float32 [1, 3, 504, 504], ImageNet-normalized planar RGB (normalization is caller-side)
  • Output: depth float32 [504, 504] (relative depth; any-view head, no sky output)

Validation (vs PyTorch fp32 reference, fixed-seed golden input)

Build max abs err median rel err load (cold) p50 latency (30f)
fp32 8.35e-07 1.94e-07 1.73 s 116.9 ms
fp16 6.81e-04 1.54e-04 1.21 s 39.1 ms
  • Export pipeline self-checks: torch.export vs wrapper = 0.0; decomposed graph vs wrapper ≤ 4.9e-04 (fp16)
  • Zero missing operators (39 aten op kinds / 2391 nodes accepted by coreai_torch)
  • Model config: HF snapshot ships no config.json; conversion uses the da3-large.yaml registry config from the DA3 source tree (weights load with unexpected=0)
  • Any-view RoPE max_position is fixed to a static constant (37) at export time — numerically identical, verified eager max|err| = 0

Usage (Swift)

import CoreAI

let model = try await AIModel(
    contentsOf: url,
    options: SpecializationOptions(preferredComputeUnitKind: .neuralEngine) // or .gpu / .default
)
guard let f = try model.loadFunction(named: "main") else { … }
let input = NDArray(scalars: pixels, shape: [1, 3, 504, 504])
var outputs = try await f.run(inputs: ["image": input])
let depth = outputs.remove("depth")?.ndArray

preferredComputeUnitKind is a preference: with the fp32 build, auto / .gpu / .neuralEngine land within noise (the model runs on GPU). The fp16 build is ~3× faster (39.1 ms vs 116.9 ms p50) and is the one that can actually benefit from ANE.

Files

  • da3large-fp32.aimodel/ — fp32 bundle (main.mlirb + main.hash + metadata.json)
  • da3large-fp16.aimodel/ — fp16 bundle
  • recipe.toml — full conversion recipe (sources, versions, validation gates)
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support