kayorl d25413b8f4 refactor(smart_color_match): 重构颜色匹配逻辑,修复多批次和色域问题
1.  支持多批次输入处理,适配不同参考图批次
2.  新增黑边自动过滤,优化有效像素统计
3.  修复数值越界导致的NaN和色域溢出问题
4.  优化算法钳制逻辑,避免缩放系数爆炸
5.  简化注释并更新参数说明
2026-07-28 22:40:51 +08:00

ComfyUI Smart Color Match (Masked)

A custom node for ComfyUI that performs color matching between a reference image and a generated image, with support for masking.

Features

  • Mask Support: Can ignore specific areas (like clothes) when calculating color statistics, ensuring the background color tone matches the reference perfectly while preserving the subject.
  • Algorithms:
    • mkl_neutral: Only adjusts mean (White Balance), very stable.
    • reinhard_lab: Adjusts mean and standard deviation in LAB color space (A/B channels only).
  • Blend Factor: Adjust the intensity of the color correction.

Installation

  1. Clone this repository into your ComfyUI/custom_nodes/ directory:
    cd ComfyUI/custom_nodes/
    git clone https://github.com/YOUR_USERNAME/ComfyUI-Smart-Color-Match.git
    
S
Description
No description provided
Readme
79 KiB
Languages
Python 100%