ComfyUI Node Runs on cloud

Metric3D Normal Map

The camera-aware normal estimator with size options

By Fannovel16·Created 3 years ago·Updated 4 months ago· 4,132
Metric3D Normal Map
  • image
  • IMAGE
backbonevit-small
fx1000
fy1000
resolution512

Metric3D is the camera-aware option in the pack's normal-map lineup. Where the other normal estimators just look at the picture, Metric3D wants to know about the camera that took it - its focal length - and uses that to compute geometry with a metric bent. It produces a surface-normal map (which way each surface faces) for a normal ControlNet, and it lets you pick a model size to trade speed against quality. If you're already leaning on Metric3D for depth or you care about geometrically grounded normals, this is the natural companion.

How it works

Metric3D is known in the depth world for metric accuracy - real-world-scale geometry rather than just relative ordering - and it's camera-aware, meaning it expects the camera intrinsics to reason about the scene properly. For a normal map, that translates to surfaces whose orientation is computed with the camera geometry in mind. Normal maps encode which direction each surface faces, so they're the input for material-aware and relighting-style generation, and this model is the geometrically careful way to get them.

The backbone choice is the classic size/quality dial: vit-small is fast and light, vit-large steps up quality, vit-giant2 is the heavyweight for maximum fidelity at the cost of speed and VRAM.

The inputs and output

  • image - your source.
  • backbone (default vit-small) - model size. Start with small; move to large or giant2 when you want more detail and can spare the compute.
  • fx (default 1000) and fy (default 1000) - the camera's focal lengths in pixels, horizontal and vertical. This is the camera-awareness knob. The 1000 defaults work fine for typical images; if you know the true focal length of your source, matching it can improve the geometry, and if normals look distorted, these are worth checking.
  • resolution (default 512) - processing size; match it to your render.

The single output is an IMAGE - the normal map - which wires into a ControlNet Apply node with a normal ControlNet (control_v11p_sd15_normalbae). Inert until that model is loaded.

Installing it

ComfyUI Manager: search ComfyUI's ControlNet Auxiliary Preprocessors, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/Fannovel16/comfyui_controlnet_aux
pip install -r requirements.txt

Restart ComfyUI. The Metric3D weights download from HuggingFace on first run, and the size scales with your backbone choice - vit-giant2 is a big file.

Where people get burned

First, backbone choice quietly determines your download size, VRAM use, and speed. People select vit-giant2 for "best quality," then wonder why the node is slow and their VRAM is tight. Start at vit-small, and only climb if the normals genuinely aren't detailed enough. On most ControlNet work the smaller backbones are plenty.

Second, the fx/fy intrinsics are a real input, not filler. If your normals come out subtly warped, a wrong focal-length assumption is a likely culprit - the defaults assume a fairly generic camera. You don't need exact numbers, but be aware the knob exists.

Third, positioning: for most people BAE is the standard normal estimator and DSINE is the sharp modern pick. Metric3D earns its slot when you specifically want the camera-aware, metric-flavored geometry, or when you're already using Metric3D's depth side and want a matching normal pass. Pick it for the reason, not by default. And the universal one - a normal map does nothing without a normal ControlNet loaded through a ControlNet Apply node, and it won't stand in for a depth map.

CategoryControlNet Preprocessors/Normal and Depth Estimators

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
backboneoptCOMBOvit-small3 options: vit-small, vit-large, vit-giant2
fxoptINT10001–16384
fyoptINT10001–16384
resolutionoptINT51264–16384

Outputs (1)

NameTypeDescription
IMAGEIMAGE