Lotus normals (fastforks)

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).

This repo is the model card only: it holds no weights. fastforks downloads the authors' weights from the links below and checks them against the SHA-256 in the model card. Code: https://github.com/kleinicke/fastforks. Kernels for the kernels backend: https://huggingface.co/fastforks/kernels. Original code: https://github.com/EnVision-Research/Lotus at b737e12238d2.

Author weight repos: https://huggingface.co/jingheya/lotus-normal-d-v1-1, https://huggingface.co/jingheya/lotus-normal-g-v1-1.

Task: depth. Tier: experimental. Outputs: normals. Backends: portable, kernels.

Input: one RGB image. Output: a depth or inverse-depth map. 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).

Variants

Weights are the authors' files (not hosted here). SHA-256 shortened to 12 hex digits; the full hashes are in card.toml.

variant weights (author link) SHA-256 weights licence commercial use
lotus-normal-d-v1-1@1 unet-d/diffusion_pytorch_model.safetensors
vae/diffusion_pytorch_model.safetensors
text_encoder/model.safetensors
91bf02e9b19d
3e4c08995484
bc1827c46545
Apache-2.0 yes
lotus-normal-g-v1-1@1 unet-g/diffusion_pytorch_model.safetensors
vae/diffusion_pytorch_model.safetensors
text_encoder/model.safetensors
f34c2b019051
3e4c08995484
bc1827c46545
Apache-2.0 yes

Licence

Original-code strings, recorded as they are (research-use package; check them before any other use). Code: Apache-2.0. Licence files: LICENSE.

Derived from Stable Diffusion 2: the CreativeML OpenRAIL++-M use restrictions (Attachment A, https://huggingface.co/stabilityai/stable-diffusion-2/blob/main/LICENSE-MODEL) apply to these weights and to their redistribution, in addition to the terms above.

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).

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)

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-d-v1-1 3000x4000 (3.0 GiB peak allocated, 3.7 reserved); lotus-normal-g-v1-1 3000x4000 (3.0 GiB peak allocated, 3.7 reserved)

Speed and memory

Depth, synthetic

model input time (ms): original fp32 original portable kernels kernels speed-up: vs original vs portable peak memory (MiB, allocated / reserved): original portable kernels
lotus-normal-d-v1-1 994x1482 – 344 268 164 2.1x 1.6x 3835 / 3898 2777 / 2940 2351 / 2500
lotus-normal-g-v1-1 994x1482 – 344 267 164 2.1x 1.6x 3836 / 3898 2777 / 2940 2351 / 2500

Startup and first call

model load (s): original portable kernels first call (s): original portable kernels
lotus-normal-d-v1-1 2.10 5.48 2.70 0.56 0.69 0.32
lotus-normal-g-v1-1 10.43 4.37 3.49 1.15 0.59 0.38

torch.compile and TensorRT

model input time: portable compile TensorRT fp16 kernels preparation: compile (cold first call) ONNX + engine build peak MiB (alloc / reserved): portable compile kernels TensorRT (engine + torch)
lotus-normal-d-v1-1 994x1482 268 ms 222 ms 107 ms 164 ms 63.9 s 183 s 2777 / 2940 2344 / 2416 2351 / 2500 4215 / 4242
lotus-normal-g-v1-1 994x1482 267 ms 222 ms 107 ms 164 ms 63.4 s 183 s 2777 / 2940 2344 / 2416 2351 / 2500 4213 / 4240

Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).

Hardware, protocol and caveats: benchmarks (RTX 5060 Ti 16 GB, sm_120). Original = the original code named above at the precision of portable (fp16, or (fp32) where fp16 is unsupported or not finite); original fp32 = its default fp32 run. Peak memory is the torch allocator's.

Accuracy

On public datasets

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.

variant dataset original fp32 original fp16 portable kernels note
lotus-normal-g-v1-1 NYUv2 test normals, mean / median angle deg, % < 11.25 / < 30 deg 16.61 / 8.98 / 59.73 / 83.32
lotus-normal-g-v1-1 iBims-1 normals, mean / median angle deg, % < 11.25 / < 30 deg 16.73 / 7.10 / 67.51 / 83.27 16.73 / 7.10 / 67.51 / 83.28 16.73 / 7.11 / 67.51 / 83.27 16.73 / 7.10 / 67.51 / 83.27
lotus-normal-d-v1-1 iBims-1 normals, mean / median angle deg, % < 11.25 / < 30 deg 16.70 / 7.28 / 67.21 / 83.52 16.70 / 7.28 / 67.22 / 83.52 16.70 / 7.28 / 67.22 / 83.52 16.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 with the original code

Every variant is checked against reference outputs of the original code at its pinned commit. 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).

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.

Usage

from fastforks import depth

model = depth.load("lotus-normal-d-v1-1")  # mode="auto": the preferred backend from recorded measurements
result = model("room.jpg")
result.normals  # [H, W] float32 tensor; result.kind says what the maps mean
# models that take a camera: model("room.jpg", intrinsics=K), K [3, 3] in pixels
result.backend  # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')

Install with pip install fastforks (see https://github.com/kleinicke/fastforks). Other variants: lotus-normal-d-v1-1, lotus-normal-g-v1-1.

Kernels backend

depth.load("lotus-normal-d-v1-1", mode="kernels") runs our CUDA kernels (cudnn_hacc). It needs a prebuilt kernel for your GPU architecture (downloaded from https://huggingface.co/fastforks/kernels on first use) and a recent NVIDIA driver; if there is none it raises BackendUnavailableError with the reason and never falls back silently. mode="auto" picks kernels when it can run and logs the choice.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for fastforks/lotus

Finetuned
(1)
this model

Collection including fastforks/lotus