Models · Monocular depth

Marigold

Marigold from ETH Zurich (PRS): depth from one image by diffusion on a Stable Diffusion UNet. Commercially usable under an OpenRAIL licence.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
marigold-depth-v1-1Middlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
963
439
408
383
342
172
6406 / 6804
3414 / 3580
2817 / 3760
2583 / 3762
2341 / 2418
2368 (engine)
Details
  • Original code: https://github.com/prs-eth/Marigold at 2bfbdea
  • Code licence: Apache-2.0 (permissive); files: LICENSE, LICENSE-MODEL, LICENSE-huggingface
  • Weights licence: LicenseRef-CreativeML-OpenRAIL-PlusPlus-M
  • Licence evidence: https://huggingface.co/prs-eth/marigold-depth-v1-1/blob/9571e7123e258cf052b4e54241f17971c290e9a8/README.md (License: CreativeML Open RAIL++-M)
  • Training data: Stable Diffusion 2 (LAION-5B subsets) fine-tuned on the synthetic Hypersim and Virtual KITTI 2 datasets per the Marigold papers (arXiv 2312.02145, 2505.09358)
  • Licence note: The weights use the OpenRAIL++-M licence: commercial use is allowed but with use restrictions that must be passed on; the training data terms are not checked.
  • Options: steps = 4 (1 to 1000), long_side = 768 (>= 0; also processing_res), seed = 2024
  • Kernel libraries: cudnn_hacc
  • Variants: marigold-depth-v1-1
  • Outputs: depth; kind: affine_invariant
  • Input size: any H x W >= 8, resized or padded inside the model
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): marigold-depth-v1-1 3000x4000 (3.0 GiB peak allocated, 3.8 reserved)
  • marigold-depth-v1-1 994x1482, first call: portable + torch.compile 127 s (cold Inductor cache), TensorRT fp16 285 s (ONNX + engine).
  • marigold-depth-v1-1 original 994x1482: the authors' float16 model option; fp16 = upstream's own torch_dtype=float16 pipeline
  • marigold-depth-v1-1 load / first call: original 1.32 s / 0.599 s, portable 8.2 s / 0.556 s, kernels 1.1† s / 0.523 s
  • † measured in the speed sweep after the portable load (or an earlier size) in the same process: file cache and kernels are warm, so the time is lower than a fresh start.
  • Protocol, median of 5 after 3 warm-up, uint8 CUDA input (synthetic for bench_inputs sizes), card defaults; gc before each load; peak = max over the first call and the timed calls

Measured

AbsRel / delta1 after a least-squares scale + shift fit (in disparity space for inverse-depth models), mean over images. Original = the original code named under Details, same checkpoint and protocol.

variantdatasetoriginal fp32original fp16portablekernelsnote
marigold-depth-v1-1NYUv2 test, AbsRel / delta10.0558 / 0.96930.0558 / 0.96940.0561 / 0.97030.0561 / 0.9703
marigold-depth-v1-1iBims-1, AbsRel / delta10.0498 / 0.97170.0498 / 0.97170.0499 / 0.97220.0499 / 0.9721
marigold-depth-v1-1ETH3D two-view train left, AbsRel / delta10.1075 / 0.87410.1075 / 0.87410.1141 / 0.87150.1141 / 0.8715possibly in the training data
marigold-depth-v1-1Middlebury 2014 trainingH left, AbsRel / delta10.0409 / 0.99090.0409 / 0.99090.0413 / 0.98990.0413 / 0.9899possibly in the training data

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06.

Parity

CPU, float32: max |diff| <= 0.0001 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 1 % and p99 <= 3 % of the reference's median |value| (absolute error of the output depth).

variantkernels error vs original, mean / p99GPU, torchkernels used
marigold-depth-v1-10.00013 / 0.00047RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400

Limitations

  • Diffusion model: the seeded noise comes from a CPU generator and differs from the original code's CUDA generator for the same seed.
  • A traced or exported module reuses the noise of its traced shape.
  • Kernels time is dominated by unfused elementwise kernels (GroupNorm / SiLU / adds).