Files
Chris UzelacandClaude Opus 4.6 f0e39418ee Add CLAHE preprocessing node for TRELLIS 3D mesh generation
ComfyUI V3 custom node that applies a four-stage image preprocessing
pipeline to suppress color artifacts (specular highlights, warm glow)
that confuse depth estimation in TRELLIS:

1. Weighted grayscale (15% R / 65% G / 20% B)
2. Specular suppression via percentile-based blending
3. CLAHE contrast enhancement (clipLimit=3.0, 8x8 tiles)
4. Grayscale-to-3ch-RGB conversion (required by TRELLIS)

Includes on-node image preview with auto-update JS extension that
re-queues on widget changes (500ms debounce).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:28:07 -07:00

17 lines
380 B
Python

from typing_extensions import override
from comfy_api.latest import ComfyExtension, io
from .clahe_node import CLAHEPreprocess
WEB_DIRECTORY = "./js"
class CLAHEExtension(ComfyExtension):
@override
async def get_node_list(self) -> list[type[io.ComfyNode]]:
return [CLAHEPreprocess]
async def comfy_entrypoint() -> CLAHEExtension:
return CLAHEExtension()