kayorl 985ab80719 refactor(smart_color_match): 重构颜色匹配节点,优化代码逻辑与注释
1. 简化单批次处理逻辑,移除多余的循环和批量适配代码
2. 更新参数注释,补充蒙版用途说明
3. 优化图像处理流程:统一转numpy格式、自动对齐参考图尺寸
4. 替换中位数统计为均值统计,调整蒙版处理逻辑
5. 优化颜色迁移算法实现,增加算法注释说明
6. 修复边界情况处理,优化警告提示
7. 统一节点显示名称为Masked版本
2026-06-14 01:02:25 +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%