PBR Extractor (Marigold)
The Node That Turns a Photo Into a Material Set
- marigold_appearance
- marigold_lighting
- pbr_pipe
This is the headline act. PBR Extractor takes two Marigold outputs - one "appearance" pass, one "lighting" pass - and distills them into a complete physically-based material: albedo, roughness, metallic, and AO, bundled into a single PBR_PIPE you can route through the rest of the pack. It's the node that makes TextureAlchemy feel like alchemy: one photo in, a render-ready material out.
Here's the part that confuses everyone on first contact, and it's a real complaint on r/comfyui: the two inputs aren't model files and they aren't mysterious separate nodes. You generate them with the same MarigoldDepthEstimation node from kijai's ComfyUI-Marigold - the trick is a variant dropdown that produces appearance in one instance and lighting in another. People search Marigold's repo for a dedicated "appearance node," find nothing, and stall. The pack ships example workflows (examples/01_quick_start_pbr_extraction.json) that show the wiring, and that's where the answer lives.
How it works
Marigold's intrinsic-image decomposition runs twice - once with an appearance model, once with a lighting model - and each emits a small batch of images. PBR Extractor unpacks them:
- Albedo - batch index 0 from whichever source
albedo_sourcepicks (default lighting, which is cleaner), withgamma_albedoapplied. - Roughness - red channel of appearance's index 1, gamma'd by
gamma_metal_rough(default 2.2). - Metallic - green channel of the same batch, same gamma.
- AO/lighting - grayscale of lighting's index 1, gamma'd by
gamma_lighting_ao.
Output is one pbr_pipe (PBR_PIPE type) containing albedo, roughness, metallic, and AO - wire it into the pack's pipeline/saver nodes.
The inputs that matter
marigold_appearance/marigold_lighting- the two IMAGE outputs from MarigoldDepthEstimation with the matching variant.albedo_source- appearance or lighting. Default lighting; switch if the albedo reads too flat.gamma_albedo(0.45) - lower = brighter albedo.gamma_metal_rough(2.2) - the README's tip: if maps look washed out, try 1.8–2.6.gamma_lighting_ao(0.45).
Installing it
Two installs, because this node is only half the story:
cd ComfyUI/custom_nodes
git clone https://github.com/amtarr/ComfyUI-TextureAlchemy
git clone https://github.com/kijai/ComfyUI-Marigold
restart, then load the Marigold IID appearance and IID lighting models via Marigold's model loader (the pack's example workflows reference prs-eth/marigold-iid-appearance-v1-1 and prs-eth/marigold-iid-lighting-v1-1). The pack itself has no extra pip dependencies; Marigold is a separate, heavier install with its own models.
Gotchas
Beyond the appearance/lighting confusion: the gamma defaults are tuned for Marigold's raw output, so fight the urge to zero them. If your roughness looks like static, check that you wired the right variant to the right input - swapping appearance and lighting makes a plausible-looking but wrong material. And pbr_pipe is a pack-internal type: it only plugs into this pack's pipeline nodes (PBR Saver, PBR Pipe Preview, the pipeline adjuster), not into generic ComfyUI image nodes. Split it first if you want individual maps.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| marigold_appearance | IMAGE | — | |
| marigold_lighting | IMAGE | — | |
| albedo_source | COMBO | lighting | Which Marigold output to use for albedo |
| gamma_albedo | FLOAT | 0.450.1–3 | Gamma correction for albedo (applied to both appearance and lighting sources) |
| gamma_metal_rough | FLOAT | 2.200.1–3 | Gamma correction for metallic and roughness maps |
| gamma_lighting_ao | FLOAT | 0.450.1–3 | Gamma correction for lighting and AO maps |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| pbr_pipe | PBR_PIPE | — |