DA3-SMALL · CoreAI (.aimodel)

Depth Anything 3 (DA3-SMALL) any-view depth model (ViT-S 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 (104.8 MB) and fp16 (54.5 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 7.15e-07 1.19e-07 0.46 s 15.4 ms
fp16 9.92e-04 2.43e-04 0.44 s 6.6 ms
  • Export pipeline self-checks: torch.export vs wrapper = 0.0; decomposed graph vs wrapper ≤ 9.8e-04 (fp16)
  • Zero missing operators (39 aten op kinds accepted by coreai_torch)
  • Note: 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, benchmarked auto / .gpu / .neuralEngine all land within noise (the model runs on GPU). The fp16 build is ~2.3× faster (6.6 ms vs 15.4 ms p50) and is the one that can actually benefit from ANE.

Files

  • da3small-fp32.aimodel/ — fp32 bundle (main.mlirb + main.hash + metadata.json)
  • da3small-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