--- license: other license_name: dinov3-license license_link: https://huggingface.co/apozz/DAP-weights-safetensors/blob/main/LICENSE.dinov3.md tags: - depth-estimation - panorama - equirectangular - "360" - dinov3 - dpt - safetensors - comfyui library_name: pytorch pipeline_tag: depth-estimation base_model: Insta360-Research/DAP-weights --- # DAP-weights-safetensors This repository hosts a **safetensors-format mirror** of [`Insta360-Research/DAP-weights`](https://huggingface.co/Insta360-Research/DAP-weights), the official checkpoint released with the paper [*Depth Any Panoramas (DAP): A Foundation Model for Panoramic Depth Estimation*](https://arxiv.org/abs/2512.16913) by Lin et al. (Insta360 Research Team, 2025). The model is a **metric depth estimator for 360° × 180° equirectangular panoramas**: DINOv3-ViT-L/16 encoder + DPT depth head + a "range-mask" head that flags pixels beyond the model's confident distance range. **Nothing here is retrained.** The weights are bit-identical to the upstream checkpoint; this mirror only changes the on-disk *format* (PyTorch `.pth` → `.safetensors`) and removes storage-shared alias keys from the state-dict to keep the file ~1.46 GB (matching the original) instead of ~2.5 GB. ## Files | File | Size | Description | | --- | --- | --- | | `dap_vitl.safetensors` | ~1.46 GB | All trainable tensors. 498 unique tensors (the upstream `.pth` exposed 858 keys; 360 were storage-aliased duplicates from `DINOv3Adapter.blocks` ↔ `DINOv3Adapter.model.blocks` — see "Implementation notes" below). | | `LICENSE.dap.md` | — | DAP MIT license (Insta360 Research Team's contribution). | | `LICENSE.dinov3.md` | — | DINOv3 License Agreement — governs the DINOv3 backbone weights inside the checkpoint, which are derivative works of Meta's DINOv3. | ## License The weights in this repository are governed by **two licenses simultaneously**: 1. **DAP / Insta360 contribution → MIT** (`LICENSE.dap.md`) 2. **DINOv3 backbone weights → [DINOv3 License Agreement](LICENSE.dinov3.md)** The DINOv3 License is permissive but **not** MIT. By using these weights you agree to its terms, including (non-exhaustive): - You may use, reproduce, distribute, copy, modify, and create derivative works of the DINO Materials. - Your use **must comply with applicable laws and Trade Controls** (US OFAC, UN, EU, UK sanctions; export controls). - You may **not** use the model for, or encourage others to use it for, any activities subject to ITAR or end-uses prohibited by Trade Controls — including military or warfare purposes, nuclear industries or applications, espionage, or the development or use of guns or illegal weapons. - If you redistribute the weights or any derivative, you **must include a copy of the DINOv3 License Agreement** alongside them. - You may not reverse engineer, decompile, or discover the underlying components of the DINO Materials. See `LICENSE.dinov3.md` for the full text. ## Acknowledgements - **Upstream weights**: [`Insta360-Research/DAP-weights`](https://huggingface.co/Insta360-Research/DAP-weights) - **DAP paper / code**: [Insta360-Research-Team/DAP on GitHub](https://github.com/Insta360-Research-Team/DAP) - **DINOv3 backbone**: Meta AI Research (DINOv3 License Agreement applies to the encoder weights inside this checkpoint). - **DPT decoder lineage**: Depth Anything V2. Neither Meta, Insta360 Research Team, nor any of the upstream authors endorse or are affiliated with this mirror. ## Citation ```bibtex @article{lin2025dap, title = {Depth Any Panoramas: A Foundation Model for Panoramic Depth Estimation}, author = {Lin, Xin and Song, Meixi and Zhang, Dizhe and Lu, Wenxuan and Li, Haodong and Du, Bo and Yang, Ming-Hsuan and Nguyen, Truong and Qi, Lu}, journal = {arXiv:2512.16913}, year = {2025} } ``` ## Usage The ergonomic path: install [ComfyUI-DAP](https://github.com/PozzettiAndrea/ComfyUI-DAP), which auto-downloads this file on first run. Direct PyTorch load: ```python from huggingface_hub import hf_hub_download from safetensors.torch import load_file path = hf_hub_download("apozz/DAP-weights-safetensors", "dap_vitl.safetensors") state = load_file(path) # Load into a DAP model built with the upstream architecture. # Use strict=False: storage-shared alias keys (DINOv3Adapter.blocks vs # DINOv3Adapter.model.blocks) are deduplicated in this checkpoint and the # missing aliases are populated automatically via the shared underlying storage. model.load_state_dict(state, strict=False) ``` ## Implementation notes The upstream `model.pth` was a flat state-dict (plus an `epoch` integer) where 360 tensor keys were storage-aliased duplicates: PyTorch's `state_dict()` walks both `DINOv3Adapter.model.blocks.*` (canonical) and `DINOv3Adapter.blocks.*` (alias registered by `self.blocks = self.model.blocks` in `DINOv3Adapter`). `torch.save` stored each unique storage once; safetensors has no storage-deduplication mechanism, so a naive `.clone()`-then-`save_file` would double the file size. This mirror keeps only the canonical `.model.*` key for each storage. When loaded into a fresh `DAP` model, the alias parameters are populated automatically because they share underlying storage with the canonical parameter.