Models · Monocular depth

Marigold normals LCM

Marigold normals LCM from ETH Zurich (PRS): surface normals from one image in one diffusion step on a Stable Diffusion UNet. Apache-2.0 code and weights.

experimental Fork of huggingface/diffusers@086bf95 · backends: portable, kernels

Checkpoint marigold-normals-lcm-v0-1

Paper 2025 Added in 0.2.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 167 ms 994x1482, fp16
vs the faster original 1.7× original fp16: 280 ms
Peak memory 2,361 MiB original: 3,441 MiB
Accuracy vs original fp32 +0.00 kernels ang_mean, NYUv2 test normals (18.45 original)

Use it

pip install fastforks

Lean install with only what this model needs: pip install fastforks-core

from fastforks import depth

model = depth.load("marigold-normals-lcm-v0-1")  # kernels on a supported GPU, else portable PyTorch
result = model(image)
result.normals
result.backend  # what ran: mode, device, dtype, kernels
fastforks bench marigold-normals-lcm-v0-1

Times the model on this machine. load(…, mode="portable") or mode="kernels" picks a backend; usage guide.

Speed and memory

Every backend on one GPU (RTX 5060 Ti 16 GB) and the same input, the authors’ code included. Kernels runs fp16. Portable runs fp16 on CUDA.

Input: synthetic, 994x1482 (the task’s standard size)

BackenddtypeTime per call (ms)vs original fp16Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32fp32not measured ––––
Original fp16the authors' float16 model option; diffusers v0.41.0 MarigoldNormalsPipeline, 1 LCM step, CPU generator seed 2024fp16 280–3,441 MiB/3,640 MiB1.20.82
Portable fp32fp32not measured ––––
Portablefp16 2721.0×2,792 MiB/2,960 MiB4.10.62
Kernelsfp16 1671.7×2,361 MiB/2,500 MiB8.20.47
Portable + torch.compile 2231.3×2,348 MiB/2,436 MiB64 (build)–
TensorRT fp16fp16 1092.6×2,320 MiBenginenot comparable182 (build)–

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-12. First call, 3 warm-up, peak reset, median of 3 rounds x median of 5. Ratios divide two times of this table (same GPU, same input). Original fp16 is the authors’ own precision option, else torch.autocast. torch.compile and TensorRT: build time instead of load time. TensorRT memory (engine, not comparable) is the GPU memory the engine took, read from the driver because TensorRT allocates outside PyTorch, so it can't be compared with the PyTorch peaks of the other rows.

Other devices

DeviceBackenddtypems / callPeak memoryOutput vs referenceInput
Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-12Originalfp322639 10.1 GiB process–994x1482
Portablefp161655 6,671 MiB processmatches994x1482
Portablefp322075 9,727 MiB processmatches994x1482
Kernelsfp16not implemented–994x1482

CUDA memory is torch’s peak allocated / reserved; Apple has no such counter, so the Mac rows show the process footprint (weights, Python and torch included). “Output vs reference” compares the device’s output with the stored golden output under the card’s tolerance; – = not checked on that device. Kernels “not implemented” = no kernels for this model on that backend yet: it runs portable there.

Licence and weights

Commercial use allowed

Code
Apache-2.0 LICENSELICENSE-huggingface
Weights
Apache-2.0 source
Training data
Stable Diffusion 2 (LAION-5B subsets) fine-tuned on the synthetic Hypersim, Virtual KITTI 2 and other synthetic datasets per the Marigold paper (arXiv 2505.09358), then LCM-distilled

Our reading of the licences, not legal advice.

Weights

unet/diffusion_pytorch_model.safetensors 3.5 GB· hosted on Hugging Face
vae/diffusion_pytorch_model.safetensors 335 MB· hosted on Hugging Face
text_encoder/model.safetensors 1.4 GB· hosted on Hugging Face

fastforks downloads and checks these files on first use (fastforks download marigold-normals-lcm-v0-1).

Accuracy

The test set through the authors’ code and through ours: same checkpoint, same protocol. The distance between the original’s fp32 and fp16 runs is what half precision alone costs; our runs should stay within it.

NYUv2 test normals

mean / median angle deg, % < 11.25 / < 30 deg

Rundtypeang_mean ↑ang_median ↑a11.25 ↑a30 ↑Δ ang_mean vs fp32 originalimagesms / image
Original fp32fp3218.4510.2255.5380.76 reference 654 610
Original fp16fp1618.4610.2255.5280.76 +0.00 654 307
Portable fp32fp3218.4510.2255.5380.76 ±0.00 654 595
Portablefp1618.4610.2255.5280.76 +0.00 654 299
Kernelsfp1618.4610.2255.5280.76 +0.00 654 184

AbsRel / delta1 after a least-squares scale + shift fit (in disparity space for inverse-depth models), mean over images. Normals: angle to the ground-truth normal over the pixels with ground truth (Marigold's evaluation sets), mean over images. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-12; portable fp32, portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 7cecd6cb, 2026-11-12.

iBims-1 normals

mean / median angle deg, % < 11.25 / < 30 deg

Rundtypeang_mean ↑ang_median ↑a11.25 ↑a30 ↑Δ ang_mean vs fp32 originalimagesms / image
Original fp32fp3217.217.3366.8282.84 reference 100 609
Original fp16fp1617.207.3366.8182.85 −0.00 100 307
Portable fp32fp3217.217.3366.8282.84 −0.00 100 595
Portablefp1617.217.3366.8182.84 +0.00 100 299
Kernelsfp1617.217.3366.8182.84 +0.00 100 184

AbsRel / delta1 after a least-squares scale + shift fit (in disparity space for inverse-depth models), mean over images. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-12; portable fp32, portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 7cecd6cb, 2026-11-12.

Closeness to the original

Beyond the test-set scores: the raw output of ours against the original’s fp32 output on the same input, pixel by pixel. CPU, float32: max |diff| <= 1e-05 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.00052 and p99 <= 0.0022 (absolute error of the output normals).

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.00001 not recorded
GPU default dtypes, mean |diff|≤ 0.00052 0.00034
GPU default dtypes, p99 |diff|≤ 0.0022 0.00146

Recorded for marigold-normals-lcm-v0-1 on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-12, with these kernels: cudnn_hacc

Details

Marigold normals (Ke et al. 2023/2025): surface normals by diffusion; a Stable Diffusion 2 UNet fine-tuned to denoise a normals latent conditioned on the image latent, distilled to one LCM step (v0.1).

Input / output
Input: one RGB image. Output: a depth or inverse-depth map.
What the numbers mean, and which models need the camera focal length

kind (a card field, result.kind) says what the numbers mean: metric = metres; scale_invariant, affine_invariant, affine_invariant_log (log depth) and affine_invariant_inverse are relative (unknown scale or shift, not metres). Metric models that use the focal length take model(image, intrinsics=K) (K [3, 3], pixels of the input): metric3d-vit-large and da3metric-large need it for correct metres (da3metric-large: metres = output x focal / 300; without intrinsics= a 300 px focal length is assumed, wrong for a real camera). unidepth-v2-vitl14, unik3d-vitl, depth-pro and MoGe estimate the camera themselves (given intrinsics= replace fx); zoedepth-nk and the relative models (da3mono-large too) take none. Normals-only models (kind none) return result.normals [B, H, W, 3] (unit vectors, camera frame: x right, y down, z forward).

Input size
any H x W >= 1, resized or padded inside the model; tested up to 3000x4000 (3,034 MiB allocated)
Options
  • steps=11 to 50· changes the output
  • long_side=768>= 0· changes the output
  • seed=2024· changes the output
Outputs
normals
CUDA kernels
  • cudnn_haccconvolutions with fp16 accumulation (cuDNN)
Apple (MPS)
fp32, fp16

Limitations

  • Normals only: no depth.
  • Diffusion model: the seeded noise comes from a CPU generator and differs from a CUDA generator's for the same seed.
  • A traced or exported module reuses the noise of its traced shape.
Full reference, generated from the repository

Marigold normals LCM from ETH Zurich (PRS): surface normals from one image in one diffusion step on a Stable Diffusion UNet. Apache-2.0 code and weights.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
marigold-normals-lcm-v0-1synthetic (994x1482)original
portable
kernels
portable + torch.compile
TensorRT fp16
280
272
167
223
109
3441 / 3640
2792 / 2960
2361 / 2500
2348 / 2436
4220 / 4250
Details
  • Original code: https://github.com/huggingface/diffusers at 086bf95
  • Code licence: Apache-2.0 (permissive); files: LICENSE, LICENSE-huggingface
  • Weights licence: Apache-2.0
  • Licence evidence: https://huggingface.co/prs-eth/marigold-normals-lcm-v0-1/blob/28214f06633a6a73088b569d1d068c3e48ea7902/README.md (license: apache-2.0)
  • Training data: Stable Diffusion 2 (LAION-5B subsets) fine-tuned on the synthetic Hypersim, Virtual KITTI 2 and other synthetic datasets per the Marigold paper (arXiv 2505.09358), then LCM-distilled
  • Options: steps = 1 (1 to 50), long_side = 768 (>= 0; also processing_res), seed = 2024
  • Kernel libraries: cudnn_hacc
  • Variants: marigold-normals-lcm-v0-1
  • Outputs: normals; kind: none
  • Input size: any H x W >= 1, resized or padded inside the model
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): marigold-normals-lcm-v0-1 3000x4000 (3.0 GiB peak allocated, 3.8 reserved)
  • marigold-normals-lcm-v0-1 994x1482, first call: portable + torch.compile 64 s (cold Inductor cache), TensorRT fp16 182 s (ONNX + engine).
  • marigold-normals-lcm-v0-1 original 994x1482: the authors' float16 model option; diffusers v0.41.0 MarigoldNormalsPipeline, 1 LCM step, CPU generator seed 2024
  • marigold-normals-lcm-v0-1 load / first call: original 6.02 s / 2.856 s, portable 4.11 s / 0.617 s, kernels 8.22 s / 0.468 s
  • Protocol, first call, 3 warm-up, peak reset, median of 3 rounds x median of 5

Measured

AbsRel / delta1 after a least-squares scale + shift fit (in disparity space for inverse-depth models), mean over images. Normals: angle to the ground-truth normal over the pixels with ground truth (Marigold's evaluation sets), mean over images. Original = the original code named under Details, same checkpoint and protocol.

variantdatasetoriginal fp32original fp16portableportable fp32kernelsnote
marigold-normals-lcm-v0-1NYUv2 test normals, mean / median angle deg, % < 11.25 / < 30 deg18.45 / 10.22 / 55.53 / 80.7618.46 / 10.22 / 55.52 / 80.7618.46 / 10.22 / 55.52 / 80.7618.45 / 10.22 / 55.53 / 80.7618.46 / 10.22 / 55.52 / 80.76
marigold-normals-lcm-v0-1iBims-1 normals, mean / median angle deg, % < 11.25 / < 30 deg17.21 / 7.33 / 66.82 / 82.8417.20 / 7.33 / 66.81 / 82.8517.21 / 7.33 / 66.81 / 82.8417.21 / 7.33 / 66.82 / 82.8417.21 / 7.33 / 66.81 / 82.84

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 7cecd6cb, 2026-11-12.

Parity

CPU, float32: max |diff| <= 1e-05 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.00052 and p99 <= 0.0022 (absolute error of the output normals).

variantkernels error vs original, mean / p99GPU, torchkernels used
marigold-normals-lcm-v0-10.00034 / 0.00146RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400

Limitations

  • Normals only: no depth.
  • Diffusion model: the seeded noise comes from a CPU generator and differs from a CUDA generator's for the same seed.
  • A traced or exported module reuses the noise of its traced shape.

Example output

No example rendered for this checkpoint yet.