ComfyUI Node

CLAHE Preprocess

CLAHE preprocessing pipeline for improving 3D mesh generation with TRELLIS. Converts to weighted grayscale, suppresses specular highlights, applies CLAHE, and outputs 3-channel RGB.

By cuzelac·Created 5 months ago·Updated 5 months ago· 0
CLAHE Preprocess
  • image
  • IMAGE
red_weight0.15
green_weight0.65
blue_weight0.20
specular_percentile90.0
specular_blur21
clip_limit3.0
tile_size8
Categoryimage/preprocessing

Inputs (8)

NameTypeDefaultDescription
imageIMAGEInput image to preprocess
red_weightFLOAT0.150–1Red channel contribution to grayscale. Low value suppresses warm glow artifacts.
green_weightFLOAT0.650–1Green channel contribution to grayscale. High value preserves structural detail.
blue_weightFLOAT0.200–1Blue channel contribution to grayscale.
specular_percentileFLOAT90.050–100Brightness percentile threshold for specular suppression.
specular_blurINT213–51Gaussian blur kernel size for specular suppression (must be odd).
clip_limitFLOAT3.00.5–10CLAHE clip limit. Higher values increase local contrast.
tile_sizeINT82–32CLAHE tile grid size (used for both dimensions).

Outputs (1)

NameTypeDescription
IMAGEIMAGE