Nodes/ComfyUI-NS-Util/NS-Albedo Map Filter
ComfyUI Node

NS-Albedo Map Filter

Strip the lighting off any render and get a clean albedo

By NakamuraShippo·Created about a year ago·Updated 4 months ago· 5
NS-Albedo Map Filter
  • image
  • height_map
  • normal_map
  • ao_map
  • albedo_map
brightness1.00
contrast1.00
saturation1.00
remove_shadows0.50
remove_highlights0.50
color_temperature0.00
tint0.00
processing_mode
denoise_strength0.00
height_influence0.30
normal_influence0.30
ao_influence0.50

If you've ever wanted to repaint or relight an image, you've hit the core problem this node exists for: the lighting is baked into the pixels. An albedo map is the image with all that shading stripped away - just the base color of every surface. That's the map you feed into a 3D texturing or relighting pipeline, and this node, found in ComfyUI as NS-Albedo Map Filter, tries to produce it from a flat render or screenshot.

Where does this actually matter? Think of the Blender + SDXL texturing crowd: render your mesh's albedo, edge and depth passes, run them through ComfyUI, and reproject the regenerated texture back onto the model. That workflow lives on albedo maps - you want the base color so you can relight or retexture without fighting the baked-in sun. If you're just relighting a single image with something like IC-Light, an albedo pass also gives you a cleaner starting point. It's a niche node for a specific job, but it's the right tool when the job shows up.

How it works

This is an OpenCV pipeline dressed up as a node. The chain is roughly:

  1. Lighting removal - remove_shadows and remove_highlights (both 0–1, default 0.5) estimate the lighting by blurring the image, then blend the bright/dark regions toward that flat estimate. Push both toward 1 and the image goes flat and dead - which is exactly what an albedo should be.
  2. Adjustments - brightness, contrast, saturation (each 0.1–2, default 1) plus color_temperature and tint (−1 to 1) for white-balance cleanup after the lighting is gone.
  3. Optional map support - if you have height_map, normal_map, or ao_map inputs (each with an *_influence 0–1 slider), they nudge the result: AO dark areas get divided back out, normal maps correct for surface orientation, height maps smooth out detail-heavy regions.
  4. Processing mode - Standard is the plain pipeline; Advanced adds CLAHE + a bilateral filter for cleaner flat regions.

The single output is albedo_map (an IMAGE), which you'd save or feed into whatever repaint/relight stage comes next.

The honest caveats

Two things will bite you. First, "AI-Enhanced" is a placeholder. Look at the source and it just calls the same advanced_processing function as Advanced - there is no AI in it. The author left a hook for future ML-based cleanup and shipped the menu option anyway. Don't expect magic there; Advanced and AI-Enhanced are currently identical.

Second, this node processes one image. The input is an IMAGE tensor, but internally it squeezes the first frame and works on that alone - a batch of frames gets its first frame processed and the rest silently ignored. For a texture pass that's fine. Don't try to feed it a video.

One more practical note: albedo output tends to look washed-out and flat. That's correct behavior. If your result looks like a desaturated mess, you're seeing a good albedo, not a bug - the color comes back when you relight it.

Installing it

This node lives in the ComfyUI-NS-Util pack, so you install the pack and get every NS node at once. Through ComfyUI Manager: Main Menu → Manager → Install via Git URL, paste:

https://github.com/NakamuraShippo/ComfyUI-NS-Util

Or clone it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/NakamuraShippo/ComfyUI-NS-Util

Then restart ComfyUI. The filter nodes need opencv-python, which the pack's requirements.txt pulls in automatically (pyyaml, watchdog, opencv-python). There are no model downloads - nothing to fetch from Hugging Face, which makes this an unusually painless custom node to get running.

When you'd reach for it

Stick it after a rendered image, push remove_shadows and remove_highlights up toward 0.8–1.0, and out comes a flat base-color map you can relight, recolor, or hand to a 3D projection pass. For everyone who isn't doing PBR-ish texture work, this node is a curiosity - but for that one workflow, it's the exact missing piece.

CategoryNS/Filter

Inputs (16)

NameTypeDefaultDescription
imageIMAGE
brightnessFLOAT1.000.1–2
contrastFLOAT1.000.1–2
saturationFLOAT1.000–2
remove_shadowsFLOAT0.500–1
remove_highlightsFLOAT0.500–1
color_temperatureFLOAT0.00-1–1
tintFLOAT0.00-1–1
processing_modeCOMBO3 options: Standard, Advanced, AI-Enhanced
denoise_strengthFLOAT0.000–1
height_mapoptIMAGE
normal_mapoptIMAGE
ao_mapoptIMAGE
height_influenceoptFLOAT0.300–1
normal_influenceoptFLOAT0.300–1
ao_influenceoptFLOAT0.500–1

Outputs (1)

NameTypeDescription
albedo_mapIMAGE