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.
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)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image to preprocess | |
| red_weight | FLOAT | 0.150–1 | Red channel contribution to grayscale. Low value suppresses warm glow artifacts. |
| green_weight | FLOAT | 0.650–1 | Green channel contribution to grayscale. High value preserves structural detail. |
| blue_weight | FLOAT | 0.200–1 | Blue channel contribution to grayscale. |
| specular_percentile | FLOAT | 90.050–100 | Brightness percentile threshold for specular suppression. |
| specular_blur | INT | 213–51 | Gaussian blur kernel size for specular suppression (must be odd). |
| clip_limit | FLOAT | 3.00.5–10 | CLAHE clip limit. Higher values increase local contrast. |
| tile_size | INT | 82–32 | CLAHE tile grid size (used for both dimensions). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |