Nodes/ComfyUI-JH-PixelPro/Luminosity Masking
ComfyUI Node

Luminosity Masking

A ComfyUI node in ComfyUI-JH-PixelPro/color with 5 inputs and 3 outputs.

By jetthuangai·Created 4 months ago·Updated 3 months ago· 5
Luminosity Masking
  • image
  • mask_shadows
  • mask_midtones
  • mask_highlights
luminance_sourcelab_l
shadow_end0.33
highlight_start0.67
soft_edge0.10
CategoryComfyUI-JH-PixelPro/color

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
luminance_sourceCOMBOlab_lLuminance channel. 'lab_l' is perceptual (Photoshop default, ~120ms @ 2K CPU). 'ycbcr_y' is fast (~7ms @ 1024 CPU) — use for realtime preview. 'hsv_v' is simple max-RGB and less perceptual.
shadow_endFLOAT0.330–0.5Upper bound of the shadow band. Luminance values below this (minus half of soft_edge) count fully as shadow.
highlight_startFLOAT0.670.5–1Lower bound of the highlight band. Luminance values above this (plus half of soft_edge) count fully as highlight. Must be > shadow_end.
soft_edgeFLOAT0.100.01–0.3Smoothstep transition width at both band edges. Smaller = sharper bands, larger = smoother blend. Partition-of-unity preserved: shadows + midtones + highlights ≈ 1.

Outputs (3)

NameTypeDescription
mask_shadowsMASK
mask_midtonesMASK
mask_highlightsMASK