PBR Generator (Advanced)
The PBR node that strips baked-in lighting — and what it actually needs from Marigold
- image
- marigold_appearance
- marigold_lighting
- Original
- BaseColor
- Normal
- Roughness
- Displacement
- AO
- Metallic
- ORM
Here's the dirty secret of the standard PBR Generator: it copies your input image straight through as the BaseColor. Great for flat AI textures, bad for anything with baked-in shadows - a renderer lights those shadows a second time, and the material looks lit twice. This Advanced variant exists to fix exactly that, by "delighting" the albedo before it ever reaches the map stack. It's the same pack, same install, and it earns its name by demanding two extra inputs that confuse everyone the first time.
How it works
The delighting comes from a Marigold appearance and lighting decomposition model - the Marigold team's intrinsic-image tool, not the depth-estimation Marigold you might already know from ControlNet. It splits a photo into an appearance estimate (the flat, unlit albedo) and a lighting estimate. You feed those into this node as two IMAGE inputs:
marigold_appearance- the delighted albedo stream, where batch index 0 is the clean appearance and index 1 carries material info.marigold_lighting- the lighting stream; index 0 is the base and index 1 drives the AO.
From the code, here's the mapping: albedo_source picks whether BaseColor comes from appearance or lighting (index 0 of either). Roughness comes from appearance index 1's red channel, metallic from its green channel, and AO from lighting index 1. Then three separate gamma controls shape each group: gamma_albedo (0.45 default - brightens), gamma_metal_rough (2.2, the standard encoding correction), and gamma_lighting_ao (0.45).
Here's the part people miss: the node still needs the plain image input and still runs the two bundled GAN models. Normal, roughness, and displacement are generated from your source image exactly like the standard node. Marigold only drives BaseColor, AO, and Metallic. (Fun bit: the code computes a Marigold-derived roughness and then quietly discards it - the GAN's roughness wins.) So it's a Marigold-plus-GAN hybrid, not pure Marigold. If you were expecting to skip the AI models, no dice.
The outputs mirror the standard node - Original, BaseColor, Normal, Roughness, Displacement, AO, Metallic, ORM - with ORM packed the usual R=AO, G=Roughness, B=Metallic way for game engines.
The input that bites
marigold_appearance and marigold_lighting are required. The node won't run without them, and the recurring community question - asked about the near-identical PBR Extractor in Texture Alchemy too - is "where do I get these images?" You don't hand-make them: you run a ComfyUI wrapper around the Marigold appearance/lighting model and feed its stacked outputs in. The wrapper has to output the appearance and lighting as batches with at least two frames, because the node reads index 0 and index 1. If you feed it a single flat image, it prints WARNING: Appearance doesn't have index 1, using zeros to the console and your maps come out flat and wrong. Check the pack's example workflows for the wiring.
Installing it
Same as its sibling - ComfyUI Manager, search ComfyUI-QFX-PBRGenerator, or:
cd ComfyUI/custom_nodes
git clone https://github.com/qornflex/ComfyUI-QFX-PBRGenerator
pip install -r ComfyUI-QFX-PBRGenerator/requirements.txt
Restart, and look under the QFX category. Dependencies are just pillow, opencv-python, scipy, numpy; the models ship in the repo, so there's no extra download. What you will need is a working Marigold appearance/lighting model in your ComfyUI, which means tracking down its wrapper - that's the fiddly dependency nobody warns you about up front.
Should you reach for it?
If your source is a generated texture with soft, even lighting, the standard node is faster and fine. If you're feeding it a photograph with visible shadows, highlights, and a sky or environment baked in, this is the one - a flat BaseColor is the difference between a material that looks right and one that fights your lighting rig. Just budget a session for setting up the Marigold side. It's the single most annoying part of this pack, and it's worth it exactly once.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| texture_name | STRING | MyTexture | — |
| seamless_mode | COMBO | seamless | 4 options: off, seamless, mirror, replicate |
| 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 |
| roughness_min | FLOAT | 0.000–1 | — |
| roughness_max | FLOAT | 1.000–1 | — |
| metallic_min | FLOAT | 0.000–1 | — |
| metallic_max | FLOAT | 1.000–1 | — |
| normal_strength | FLOAT | 1.000–5 | — |
| normal_invert_y | BOOLEAN | true | — |
| ao_blur | INT | 20–10 | — |
| ao_strength | FLOAT | 1.000–2 | — |
| save_textures | BOOLEAN | true | — |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| Original | IMAGE | — |
| BaseColor | IMAGE | — |
| Normal | IMAGE | — |
| Roughness | IMAGE | — |
| Displacement | IMAGE | — |
| AO | IMAGE | — |
| Metallic | IMAGE | — |
| ORM | IMAGE | — |