Nodes/ComfyUI MultiPoint White Balance/Exposure Match from Point
ComfyUI Node

Exposure Match from Point

Point-and-click exposure matching — a color dropper for brightness

By MengYe-Z·Created 4 months ago·Updated 4 months ago· 1
Exposure Match from Point
  • images
  • positive_coords
  • image
  • exposure_data
target_luminance0.965

Exposure Match from Point is the measure-first half of the MultiPoint White Balance pack's exposure path: you click a few spots on a neutral background, it averages their brightness, and it hands you a single number that pushes that average to whatever brightness you want. If you've ever wished a color picker existed for exposure, this is it.

What it's for

Product photography again, and the boring-but-real problem it solves: your white background isn't the same brightness across a batch of shots, or it's a touch dark under the lights. Eyeballing a brightness slider is fiddly; clicking three pixels on the background and saying "make these this bright" is precise. The node samples the points, works out the average luminance, and returns a single multiplier that brings that average up (or down) to your target. It's the exposure equivalent of gray-card white balance - and like that trick, it assumes the thing you sample is neutral and representative.

How it works

For each point it reads the RGB, averages the three channels into a luminance value, and averages those across all your points. Then:

gain = target_luminance / average_luminance

That's the whole mechanism - one global scalar. The data JSON it outputs carries gain, the measured avg_luminance, your target_luminance, and a points_count so you can sanity-check what you measured. One subtlety worth knowing: the gains are computed from the first image in the batch (images[0]) and then applied to every image you pass in. Fine for a single frame; don't batch wildly different shots through it expecting per-frame results.

Inputs and outputs

  • images - the image you want to measure. For noisy or stained backgrounds, feed the blurred copy here (the pack's Gaussian Blur (Smooth), or any blur node) so dust and noise don't skew your average. For an already-clean background, feed the original.
  • positive_coords - connect the positive_coords output of KJNodes' PointsEditor. This is a JSON list of {x, y} points; there's no widget, it must be wired.
  • target_luminance - the only setting you'll touch. Default 0.9647, which is roughly RGB 246 (0 = black, 1 = white). Leave it near the default for a white background; drop it if you're measuring a mid-gray background you want kept gray.

Outputs are two: an image preview (the gain applied to whatever you measured - the README is explicit that this is preview-only, not your final result) and the exposure_data JSON string, which wires into Apply Exposure Gain along with your original sharp image.

Install

It ships with the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/MengYe-Z/ComfyUI-MultiPointWhiteBalance.git

or via ComfyUI Manager → Install Custom Nodes → search "ComfyUI MultiPoint White Balance" → restart. No model files, effectively no pip deps. The real prerequisite is KJNodes, which provides the PointsEditor that generates positive_coords.

Common gotchas

An empty or malformed positive_coords raises an error - "positive_coords is empty. Please connect PointsEditor output." is the exact message you'll see if you forgot the wire. And watch the gain math: sample a shadow and avg_luminance is tiny, so the gain explodes and Apply Exposure Gain blows out your highlights. Sample uniform, midtone, non-highlight areas. Also worth knowing: a single global gain can't fix uneven illumination - the README says it plainly, the average matches your target, not each point.

Categoryimage/color

Inputs (3)

NameTypeDefaultDescription
imagesIMAGE
positive_coords*Connect PointsEditor positive_coords output
target_luminanceFLOAT0.9650–1Target brightness for selected points (0=black, 1=white). Default 0.9647 ≈ RGB 246

Outputs (2)

NameTypeDescription
imageIMAGE
exposure_dataSTRING