Nodes/radiance/Multipass Estimate
ComfyUI Node

Multipass Estimate

Pull a full VFX pass set out of a flat image, with real models and a real download

By FXTD-Studios·Created 8 months ago·Updated about 18 hours ago· 246
Multipass Estimate
  • beauty
  • prev_frame
  • moge_model
  • passes
  • beauty
  • albedo
  • roughness
  • metallic
  • diffuse_lighting
  • specular_lighting
  • normal_map
  • depth
  • world_position
  • ao
  • curvature
  • motion_vector
  • geometry_mask
  • info
◄beauty_encodingsRGB (display)►
◄geometrytrue►
◄materialstrue►
◄lightingtrue►
◄download_missing_modelstrue►
◄geometry_detail9►
◄fov_x_degrees0.0►
◄normal_conventionOpenGL (Y-Up)►
◄ao_radius_m0.50►
◄ao_quality8►
◄material_steps4►
◄material_resolution768►
◄ensemble_size1►
◄seed0►
◄batch_is_sequencetrue►

This is the ambition node of the pack. Give it a plate - a photo, a render, a generated frame - and it produces depth, camera-space position, normals, AO, curvature, albedo, roughness, metallic, and separate diffuse and specular lighting. That's most of what a compositor would ask a renderer for, estimated from one image.

It's also the node with the largest downloads and the most honest "results will vary" warning attached to it. Both of those are true, and they don't cancel out.

What's actually running

Two real models, and they're the reason to take this seriously:

  • MoGe-2 (Microsoft Research, with Tsinghua) for geometry - depth, position, normals, AO, curvature. MoGe is the monocular geometry model that predicts an affine-invariant point map rather than a depth map: a per-pixel 3D coordinate, plus a validity mask that excludes sky and other regions where geometry is undefined. From that point map you get metric-scale depth, camera-space position, and normals that are derived from geometry rather than hallucinated texture. MoGe-2 adds metric scale and sharper detail. 662 MB, and the pack says MoGe-2 specifically is required for normals.
  • Marigold IID (ETH Zurich) for materials and lighting - albedo, roughness, metallic from the Appearance model (2.5 GB), diffuse and specular light from the Lighting model (1.7 GB, sharing files with Appearance). Marigold is the Stable-Diffusion-derived estimator: instead of training a discriminative model, it reframes the task as a denoising diffusion process on top of SD's visual prior, which is exactly why it generalises to illustrations and synthetic plates that would break a photo-trained model. The cost is speed, and here the cost is real.

The author's framing - "No image-filter guesses" - is the point. This isn't four blurs and a threshold dressed up as passes.

Inputs and outputs

Required: beauty (the plate, one image or a batch), beauty_encoding (sRGB (display) for ordinary images and video frames, Linear (scene) for scene-linear EXR plates - values above 1.0 get clipped for the models and excluded from the lighting fit), and the three toggles: geometry, materials, lighting. Turn off what you don't need; that's the difference between a 662 MB and a ~4 GB download and a two-minute versus a ten-minute run.

The optional controls that matter: geometry_detail (0 fastest to 9 most detail - this is MoGe's resolution level and the main quality/speed dial for the geometry half), fov_x_degrees (set a known field of view, or leave 0 to estimate), normal_convention (OpenGL vs DirectX - flip green to match whatever reads the pass downstream), ao_radius_m and ao_quality for ambient occlusion, material_steps (4 is Marigold's trained default - don't crank it expecting free quality), material_resolution (768 is the trained size), and ensemble_size (average several predictions; slower, steadier).

seed deserves a sentence: it's reused on every frame deliberately, to limit flicker. And batch_is_sequence (default true) treats a batch as consecutive frames so motion vectors make sense. For a single still, prev_frame gives the motion vector something to compare against.

Outputs: passes (a RADIANCE_PASSES bundle for Write EXR Passes and Relight) plus thirteen individual IMAGE outputs - beauty (linear), albedo, roughness, metallic, diffuse_lighting, specular_lighting, normal_map, depth, world_position, ao, curvature, motion_vector, geometry_mask - and info, a JSON string with the models used, estimated field of view, lighting scale factors and fit error. Read info. The fit error tells you whether the lighting decomposition worked or just found a plausible-looking split, and the FOV tells you whether your metric depth is trustworthy.

Installing Radiance, and the model download

Manager → search Radiance → install → restart → refresh. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/fxtd-studios/radiance.git
cd radiance
python -m pip install -r requirements.txt

Windows portable: use python_embeded\python.exe. Then the important part: this node needs diffusers and accelerate (the latter so Marigold's 1.7 GB UNets fit without a second full-size copy in RAM), and it downloads weights on first run. download_missing_models defaults on and pulls pinned versions from Hugging Face. RADIANCE_ALLOW_DOWNLOADS=0 or HF_HUB_OFFLINE=1 always blocks it, which is what you want on a metered connection. You can also bring your own MoGe via the moge_model input from ComfyUI's Load MoGe Model - but it must be MoGe-2 for normals.

Troubleshooting

Video flickers. Documented, expected. These are per-frame estimates; the fixed seed limits it and ensemble_size steadies it, at the cost of time.

Sky and edges of frame look wrong. Check geometry_mask - sky is where MoGe found no surface, and depth is 0 there by design.

It ran out of memory or took forever. Marigold is expensive. Drop material_resolution toward 768 (or below), keep material_steps at 4, and consider turning lighting or materials off. On consumer cards the geometry half is the affordable one.

Expectations, from people who actually ran it. A user in the community discussion of this pack noted the practical ceiling: "With a 4090 you won't be able to run the giant models in fp16 when it goes above 1-2k res," and that these nodes "won't create real 16/32 bit exr. For that you need your input to have the data." That's the right way to read this node. It estimates passes - usefully, from real models - but it doesn't recover information that was never captured. If you have genuine multilayer EXRs, use Multipass AOV Reader instead and skip the guesswork entirely.

Licensing, briefly. Radiance code is GPL-3.0. Check the licence on each model you enable; MoGe is permissively licensed, and Marigold is Apache-2.0, but verify before shipping anything commercial.

CategoryFXTD STUDIOS/Radiance/VFX

Inputs (18)

NameTypeDefaultDescription
beautyIMAGEThe plate. One image or a batch of frames.
beauty_encodingCOMBOsRGB (display)How the plate is encoded. Ordinary images and video frames are sRGB. Choose Linear for scene-linear EXR plates; values above 1.0 are clipped for the models and left out of the lighting fit.
geometryBOOLEANtrueDepth, position, normals, AO and curvature (MoGe-2, 662 MB).
materialsBOOLEANtrueAlbedo, roughness, metallic (Marigold IID Appearance, 2.5 GB).
lightingBOOLEANtrueDiffuse and specular lighting (Marigold IID Lighting, 1.7 GB; shares files with Appearance).
download_missing_modelsBOOLEANtrueFetch missing weights from Hugging Face on first run (pinned versions). RADIANCE_ALLOW_DOWNLOADS=0 or HF_HUB_OFFLINE=1 always blocks this.
prev_frameoptIMAGEPrevious frame for motion vectors of a single image.
moge_modeloptMOGE_MODELOptional: a model from ComfyUI's Load MoGe Model. Must be MoGe-2 for normals.
geometry_detailoptINT90–9MoGe resolution level: 0 fastest, 9 most detail.
fov_x_degreesoptFLOAT0.00–170Known horizontal field of view. 0 = estimate it.
normal_conventionoptCOMBOOpenGL (Y-Up)Encoding of the camera-space normal pass (0..1, +Z toward the camera). DirectX (Y-Down) flips the green channel; match the renderer or tool reading it.
ao_radius_moptFLOAT0.500.01–50Occlusion search radius in metres of scene space.
ao_qualityoptINT82–32AO slices and steps per slice.
material_stepsoptINT41–50Marigold denoising steps. 4 is the trained default.
material_resolutionoptINT7680–2048Marigold processing size (long edge). 768 is the trained size; 0 = native.
ensemble_sizeoptINT11–10Average several Marigold predictions. Slower, steadier.
seedoptINT00–4294967295Marigold noise seed, reused on every frame to limit flicker.
batch_is_sequenceoptBOOLEANtrueTreat the batch as consecutive frames for motion vectors.

Outputs (15)

NameTypeDescription
passesRADIANCE_PASSESEvery estimated pass plus the linear beauty, for Write EXR Passes and Relight.
beautyIMAGEThe plate, scene-linear.
albedoIMAGEBase colour, scene-linear (Marigold IID Appearance).
roughnessIMAGERoughness 0..1 (Marigold IID Appearance).
metallicIMAGEMetallic 0..1 (Marigold IID Appearance).
diffuse_lightingIMAGEDiffuse light contribution, scene-linear, scaled to the plate (Marigold IID Lighting).
specular_lightingIMAGENon-diffuse light (reflections, highlights), scene-linear, scaled to the plate.
normal_mapIMAGECamera-space normals, 0..1 encoded (MoGe-2).
depthIMAGEMetric z depth in metres; 0 where there is no surface (MoGe-2).
world_positionIMAGECamera-space position in metres, OpenGL axes (MoGe-2).
aoIMAGEAmbient occlusion from the metric geometry, 1 = open.
curvatureIMAGEMean curvature in 1/metre, convex positive.
motion_vectorIMAGEBackward optical flow to the previous frame in pixels, +y up.
geometry_maskIMAGE1 where MoGe found a surface, 0 for sky and invalid pixels.
infoSTRINGJSON: models, estimated field of view, lighting scale factors and fit error.