How to use from the
Use from the
MLX library
# Download the model from the Hub
pip install huggingface_hub[hf_xet]

hf download mlx-community/Video-Depth-Anything-Large-MLX --local-dir Video-Depth-Anything-Large-MLX

Video Depth Anything Large (MLX)

MLX port of Video Depth Anything (ByteDance, CVPR 2025 highlight): consistent monocular depth estimation for arbitrarily long videos. Converted from the official checkpoint depth-anything/Video-Depth-Anything-Large.

Architecture: DINOv2 backbone + DPT head with AnimateDiff-style temporal motion modules. Outputs per-frame depth maps, not text.

Usage

from mlx_vlm import load
from mlx_vlm.models.video_depth_anything.generate import (
    VideoDepthPredictor,
    read_video_frames,
)

model, processor = load("mlx-community/Video-Depth-Anything-Large-MLX")
predictor = VideoDepthPredictor(model, processor)

frames, fps = read_video_frames("input.mp4", max_len=300, target_fps=15)
depths = predictor.infer(frames)  # (T, H, W) float32

Notes

  • Inputs are channel-last (B, T, H, W, 3); H and W must be multiples of 14.
  • Metric model: no. Metric models output absolute depth (meters) and skip scale/shift window alignment.
  • Weights are fp32. On GPU, output matches the PyTorch reference to ~1% relative (Metal fast-math); on CPU to ~1e-5.

License

CC-BY-NC-4.0 (same as the source checkpoint). Non-commercial use only.

Downloads last month
66
Safetensors
Model size
0.4B params
Tensor type
F32
ยท
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support