Models · Monocular depth

Lotus normals

Lotus from HKUST (Guangzhou): surface normals from one image in one step on a Stable Diffusion UNet, generative (G) or direct (D). Apache-2.0 code and weights.

experimental Fork of EnVision-Research/Lotus@b737e12 · backends: portable, kernels

Checkpoint

Paper 2024 Added in 0.2.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 164 ms 994x1482, fp16
vs the faster original 2.1× original fp16: 344 ms
Peak memory 2,351 MiB original: 3,836 MiB
Accuracy vs original fp32 +0.00 kernels ang_mean, iBims-1 normals (16.73 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("lotus-normal-g-v1-1")  # kernels on a supported GPU, else portable PyTorch
result = model(image)
result.normals
result.backend  # what ran: mode, device, dtype, kernels
fastforks bench lotus-normal-g-v1-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; upstream Lotus-G pipeline, diffusers 0.41.0, timestep 999, seed 42fp16 344–3,836 MiB/3,898 MiB2.20.50
Portable fp32fp32not measured ––––
Portablefp16 2671.3×2,777 MiB/2,940 MiB4.40.59
Kernelsfp16 1642.1×2,351 MiB/2,500 MiB3.50.38
Portable + torch.compile 2221.6×2,344 MiB/2,416 MiB63 (build)–
TensorRT fp16fp16 1073.2×2,310 MiBenginenot comparable183 (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-12Originalfp3239522 12.1 GiB process–994x1482
Portablefp161553 6,632 MiB processmatches994x1482
Portablefp322886 9,700 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 LICENSE
Weights
Apache-2.0 source
Training data
Stable Diffusion 2 base (LAION-5B subsets) fine-tuned on the synthetic Hypersim and Virtual KITTI 2 per the Lotus paper (arXiv 2409.18124)

Our reading of the licences, not legal advice.

Weights

unet-g/diffusion_pytorch_model.safetensors 3.5 GB· hosted on Hugging Face
vae/diffusion_pytorch_model.safetensors 167 MB· hosted on Hugging Face
text_encoder/model.safetensors 681 MB· hosted on Hugging Face

fastforks downloads and checks these files on first use (fastforks download lotus-normal-g-v1-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 ↑imagesms / image
Original fp32not measured
Original fp16not measured
Portable fp32not measured
Portablenot measured
Kernelsfp1616.618.9859.7383.32 654 185

The original code was not run on this dataset, so the table cannot show the distance to it.

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. Measured on RTX 5060 Ti, torch 2.14.1+cu130, fastforks 11209576, 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 fp32fp3216.737.1067.5183.27 reference 100 616
Original fp16fp1616.737.1067.5183.28 −0.00 100 385
Portable fp32fp3216.737.1067.5183.27 ±0.00 100 594
Portablefp1616.737.1167.5183.27 +0.00 100 299
Kernelsfp1616.737.1067.5183.27 +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 11209576, 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.00053 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.00053 0.0003
GPU default dtypes, p99 |diff|≤ 0.0022 0.00125

Recorded for lotus-normal-g-v1-1 on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-12, with these kernels: cudnn_hacc

Details

Lotus (He et al., ICLR 2025): surface normals by a Stable Diffusion 2 UNet fine-tuned to predict the normals latent in one step; Lotus-G (generative: also denoises a noise latent) and Lotus-D (deterministic), v1.1 (aligned normals).

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
  • long_side=768>= 0· changes the output
  • seed=42· changes the output
Outputs
normals
Checkpoint
generative=true
CUDA kernels
  • cudnn_haccconvolutions with fp16 accumulation (cuDNN)
Apple (MPS)
fp32, fp16

Limitations

  • Normals only: no depth.
  • Lotus-G: the seeded noise comes from a CPU generator and differs from a CUDA generator's for the same seed (Lotus-D uses it only for the image latent's posterior sample).
  • A traced or exported module reuses the noise of its traced shape.
Full reference, generated from the repository

Lotus from HKUST (Guangzhou): surface normals from one image in one step on a Stable Diffusion UNet, generative (G) or direct (D). Apache-2.0 code and weights.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
lotus-normal-g-v1-1synthetic (994x1482)original
portable
kernels
portable + torch.compile
TensorRT fp16
344
267
164
222
107
3836 / 3898
2777 / 2940
2351 / 2500
2344 / 2416
4213 / 4240
lotus-normal-d-v1-1synthetic (994x1482)original
portable
kernels
portable + torch.compile
TensorRT fp16
344
268
164
222
107
3835 / 3898
2777 / 2940
2351 / 2500
2344 / 2416
4215 / 4242
Details
  • Original code: https://github.com/EnVision-Research/Lotus at b737e12238d2
  • Code licence: Apache-2.0 (permissive); files: LICENSE
  • Weights licence: Apache-2.0
  • Licence evidence: https://github.com/EnVision-Research/Lotus/blob/b737e12238d2a41fc582ee8c6c6b1104d318d799/LICENSE (Apache-2.0); https://huggingface.co/jingheya/lotus-normal-g-v1-1/blob/92b42fd7f5c3f97f09a2af8e96263d87ea899bf1/README.md (license: apache-2.0)
  • Training data: Stable Diffusion 2 base (LAION-5B subsets) fine-tuned on the synthetic Hypersim and Virtual KITTI 2 per the Lotus paper (arXiv 2409.18124)
  • Options: long_side = 768 (>= 0; also processing_res), seed = 42
  • Kernel libraries: cudnn_hacc
  • Variants: lotus-normal-g-v1-1, lotus-normal-d-v1-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): lotus-normal-g-v1-1 3000x4000 (3.0 GiB peak allocated, 3.7 reserved); lotus-normal-d-v1-1 3000x4000 (3.0 GiB peak allocated, 3.7 reserved)
  • lotus-normal-g-v1-1 994x1482, first call: portable + torch.compile 63 s (cold Inductor cache), TensorRT fp16 183 s (ONNX + engine).
  • lotus-normal-d-v1-1 994x1482, first call: portable + torch.compile 64 s (cold Inductor cache), TensorRT fp16 183 s (ONNX + engine).
  • lotus-normal-g-v1-1 original 994x1482: the authors' float16 model option; upstream Lotus-G pipeline, diffusers 0.41.0, timestep 999, seed 42
  • lotus-normal-d-v1-1 original 994x1482: the authors' float16 model option; upstream Lotus-D pipeline, diffusers 0.41.0, timestep 999, seed 42
  • lotus-normal-g-v1-1 load / first call: original 10.43 s / 1.15 s, portable 4.37 s / 0.588 s, kernels 3.49 s / 0.384 s
  • lotus-normal-d-v1-1 load / first call: original 2.1 s / 0.556 s, portable 5.48 s / 0.693 s, kernels 2.7 s / 0.317 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
lotus-normal-g-v1-1NYUv2 test normals, mean / median angle deg, % < 11.25 / < 30 deg16.61 / 8.98 / 59.73 / 83.32
lotus-normal-g-v1-1iBims-1 normals, mean / median angle deg, % < 11.25 / < 30 deg16.73 / 7.10 / 67.51 / 83.2716.73 / 7.10 / 67.51 / 83.2816.73 / 7.11 / 67.51 / 83.2716.73 / 7.10 / 67.51 / 83.2716.73 / 7.10 / 67.51 / 83.27
lotus-normal-d-v1-1iBims-1 normals, mean / median angle deg, % < 11.25 / < 30 deg16.70 / 7.28 / 67.21 / 83.5216.70 / 7.28 / 67.22 / 83.5216.70 / 7.28 / 67.22 / 83.5216.70 / 7.28 / 67.21 / 83.5216.70 / 7.28 / 67.22 / 83.52

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

Parity

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

variantkernels error vs original, mean / p99GPU, torchkernels used
lotus-normal-g-v1-10.0003 / 0.00125RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400
lotus-normal-d-v1-10.00035 / 0.00144RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400

Limitations

  • Normals only: no depth.
  • Lotus-G: the seeded noise comes from a CPU generator and differs from a CUDA generator's for the same seed (Lotus-D uses it only for the image latent's posterior sample).
  • A traced or exported module reuses the noise of its traced shape.

Example output

No example rendered for this checkpoint yet.