ComfyUI Node
Masked Lab grade
Shift and scale a masked region's CIE Lab mean and spread to a reference region's, the spread change bounded. Matches a patch, a decal or a texture to the colour around it.
Masked Lab grade
- image
- mask
- reference_image
- reference_mask
- ui_widget
- image
- report
- image_list
◄min_stretch0.25►
◄max_stretch1.00►
◄amount1.00►
◄apply_tomask►
Category✨ LF Nodes/Texture
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Image(s) to grade (sRGB). | |
| mask | MASK | The region to measure and grade; values weight both. One mask for all images or one per image. | |
| reference_image | IMAGE | Image holding the colour to match: one for all images or one per image. | |
| reference_mask | MASK | The reference region on reference_image; values weight the measurement. | |
| min_stretch | FLOAT | 0.250.01–4 | Lowest factor applied to each Lab channel's spread (reference spread / image spread, clamped). |
| max_stretch | FLOAT | 1.000.01–4 | Highest spread factor. 1.0 may narrow the spread but never widens it, so noise is not amplified. |
| amount | FLOAT | 1.000–1 | Share of the grade applied: 0 keeps the image, 1 matches the reference. |
| apply_to | COMBO | mask | mask: blend the grade by the mask's values; image: grade every pixel by the masked measurement. |
| ui_widgetopt | LF_COMPARE | [object Object] | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | Graded image batch; pixels with zero weight and alpha are unchanged. |
| report | JSON | lf.masked-lab-grade.v1: Lab mean and spread of the image, reference and result regions, and the stretch. |
| image_list | IMAGE | The same graded images as an authoritative list. |