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>
17 lines
380 B
Python
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()
|