Nodes/ComfyUI-TextureAlchemy/Texture Equalizer
ComfyUI Node

Texture Equalizer

The node that strips baked-in lighting off your textures

By amtarr·Created 9 months ago·Updated 4 months ago· 58
Texture Equalizer
  • image
  • image
  • average_color
radius100
strength1.00
preserve_colortrue
methodoverlay

If your texture pipeline starts from photos - and most real ones do - your albedo has baked-in lighting you didn't ask for. Shadows from the shooting setup, a bright window on one side, vignetting in the corners. When that texture becomes a PBR material, those lighting gradients render as fake shading that fights your scene's lights. Texture Equalizer is the fix: it flattens uneven lighting while leaving the actual surface detail intact.

It's the single most useful node in this pack for anyone doing photogrammetry-adjacent or scanned material work. You run it on the albedo before the seamless step, and suddenly your material behaves like a flat, neutral surface instead of a photograph with a shadow baked across it.

How it works

This is the classic Photoshop "equalize texture" technique (it's a direct port of Tolas' old tutorial), done in torch:

  1. Extract the image's average color - simulating Photoshop's Average Blur.
  2. Gaussian-blur the image and subtract it to get a high-pass version, which isolates fine detail and removes broad lighting gradients.
  3. Blend the average color with the inverted high-pass using a blend mode. overlay is the Photoshop standard and the default; soft_light is gentler; linear_light is the aggressive hammer.
  4. Optionally keep the original hue/saturation so only brightness changes (the preserve_color toggle).
  5. strength fades the whole effect from 0 (no change) to 2 (exaggerated).

The average_color output is exactly what it sounds like - the flat average color, emitted as a full-size image. It's a debugging aid: if your output looks wrong, check that this value looks like the dominant color of your texture.

The dials that matter

  • radius (1–500, default 100) - the high-pass radius. Lower = the effect respects smaller gradients, higher = more aggressive flattening. 50–150 is the working range; start at 100.
  • strength (0–2, default 1) - overall effect. 0.5–0.7 for subtle cleanup.
  • preserve_color - ON for albedo (you want the paint, not a recolored photo). OFF for height and roughness maps, where hue is meaningless.
  • method - overlay, soft_light, or linear_light.

Outputs: image (equalized) and average_color.

Installing it

Texture Equalizer is part of ComfyUI-TextureAlchemy. In ComfyUI Manager search "Texture Alchemy", install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/amtarr/ComfyUI-TextureAlchemy
# restart ComfyUI

No extra dependencies, no models - pure PyTorch. Found under Add Node → Texture Alchemist → Texture. The README's "copy the ComfyUI_PBR_MaterialProcessor folder" instruction is a pre-rebrand leftover; ignore it.

Where people get burned

Output too dark or black is the classic complaint. The usual causes: linear_light pushed values past the ends of the range, or the radius was so high the high-pass swallowed the detail. The author's own troubleshooting says it plainly: switch to overlay, drop radius to 30–70, drop strength to 0.5–0.7, and check the average_color output to confirm the extraction wasn't garbage in the first place. Also: run the equalizer before you make the texture seamless - flattening first, then tiling, gives you a much cleaner seam than the reverse order.

CategoryTexture Alchemist/Texture

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
radiusFLOAT1001–500High pass radius - controls detail preservation (50-150 typical)
strengthFLOAT1.000–2Effect strength (1.0 = full correction, 0.0 = no change)
preserve_colorBOOLEANtruePreserve original color hue (recommended for albedo)
methodCOMBOoverlayBlend method: overlay (Photoshop standard), soft_light (subtle), linear_light (strong)

Outputs (2)

NameTypeDescription
imageIMAGE
average_colorIMAGE