Monocular Depth Estimation for Foundry Nuke
This plugin brings Depth Anything 3 monocular depth estimation to Foundry's Nuke compositing software. It generates high-quality depth maps from single RGB images using the DA3Mono-Large model (350M parameters).
Depth Anything 3 represents the state-of-the-art in monocular depth estimation, significantly outperforming previous versions (DA1, DA2) in geometric accuracy.
Pre-traced models for various resolutions (720p, 2K, 3K, 4K) are available on my Patreon.
⚠️ IMPORTANT: The input resolution MUST match the traced model resolution exactly!
Read → Reformat → Inference → Reformat → Output
(to model) (.cat) (to original)
- Type: to box
- Width/Height: exact model resolution
- Resize type: distort
- Filter: Cubic (Keys)
- ☑️ force shape ← critical!
If you need to create a .cat file from the .pt model:
- Open Nuke's CatFileCreator
- Set TorchScript file:
DepthAnything3_mono_large_WxH_fp32.pt - Cat file:
DepthAnything3_mono_large_WxH_fp32.cat - Channels in:
rgba.red, rgba.green, rgba.blue - Channels out:
rgba.alpha - Model ID:
DepthAnything3 - Create the
.catfile
- Python 3.10
- PyTorch 2.1.1 (must match Nuke 16.0)
depth_anything_3packagesafetensors
conda create -n da3_nuke16 python=3.10 -y
conda activate da3_nuke16
pip install torch==2.1.1 torchvision==0.16.1 --index-url https://download.pytorch.org/whl/cu118
pip install safetensors
git clone https://github.com/ByteDance-Seed/Depth-Anything-3.git
cd Depth-Anything-3
pip install -e .
# Verify
python -c "import torch; print(f'PyTorch {torch.__version__}, CUDA {torch.cuda.is_available()}')"
python -c "from depth_anything_3.api import DepthAnything3; print('DA3 imported OK')"huggingface-cli download depth-anything/DA3MONO-LARGE --local-dir ./DA3MONO-LARGEThe included nuke_da3_v3.py script can trace models at any resolution (width and height must be multiples of 14):
# Square resolution
python nuke_da3_v3.py \
--model-path /path/to/model.safetensors \
--config-path /path/to/config.json \
--resolution 2520 \
--no-half \
--output-dir ./output
# Non-square (16:9) resolution - saves VRAM!
python nuke_da3_v3.py \
--model-path /path/to/model.safetensors \
--config-path /path/to/config.json \
--width 2058 \
--height 1092 \
--no-half \
--output-dir ./output| Format | Resolution | Patches | VRAM (FP32) |
|---|---|---|---|
| 720p | 1288×728 | 92×52 | ~4 GB |
| 2K DCI | 2058×1092 | 147×78 | ~6-8 GB |
| 3K DCI | 3080×1624 | 220×116 | ~12-16 GB |
| 4K DCI | 4102×2170 | 293×155 | ~20-24 GB |
| Component | Version |
|---|---|
| Nuke | 15.1, 15.2, 16.0 |
| PyTorch | 2.1.1 |
| CUDA | 11.8+ |
| OS | Rocky Linux 8/9+, Windows 10/11 |
- Paper: Depth Anything 3: Recovering the Visual Space from Any Views
- Authors: Haotong Lin, Sili Chen, Jun Hao Liew, Donny Y. Chen, Zhenyu Li, Guang Shi, Jiashi Feng, Bingyi Kang
- Organization: ByteDance Seed Team
- Repository: https://github.com/ByteDance-Seed/Depth-Anything-3
- Project Page: https://depth-anything-3.github.io/
Tracing and wrapper by Peter Mercell
Special thanks to:
- Rafael Silva for his excellent Depth-Anything-for-Nuke project, which served as the foundation and inspiration for this work.
- PozzettiAndrea for ComfyUI-DepthAnythingV3 reference implementation.
This Nuke integration is released under the Apache License 2.0.
The DA3Mono-Large model is licensed under Apache License 2.0 by ByteDance.
See LICENSE.txt for full license text.
If you use this in your work, please cite the original paper:
@article{depthanything3,
title={Depth Anything 3: Recovering the visual space from any views},
author={Haotong Lin and Sili Chen and Jun Hao Liew and Donny Y. Chen and
Zhenyu Li and Guang Shi and Jiashi Feng and Bingyi Kang},
journal={arXiv preprint arXiv:2511.10647},
year={2025}
}