kayorl eb41bf127d refactor(color_match): 优化颜色迁移算法的内存管理和性能
重构颜色迁移算法,改进内存管理并优化性能:
1. 使用更高效的内存处理方式,减少临时变量和拷贝
2. 优化mask处理逻辑,支持批量处理
3. 改进颜色迁移计算过程,使用原地操作减少内存分配
4. 添加中文注释说明关键参数
5. 优化错误处理流程,确保稳定性
2026-01-23 10:27:29 +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%