kayorl 486fc65135 fix(smart_color_match): 修复多类型输入导致的崩溃与色彩异常
1. 强制转换张量为float32,解决PyTorch2.9+低精度类型导致的numpy异常
2. 自动处理4通道RGBA输入,剥离多余Alpha通道
3. 兼容更多格式的mask输入,自动适配数值范围
4. 优化有效像素校验逻辑,增加明确的警告提示
5. 简化冗余注释,统一代码风格
2026-06-25 01:28:00 +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%