Meld Auto Exposure
Fix dark or blown-out generations without fighting the sliders
- image
- image
- calculated_gamma
- current_brightness
You know the problem: the composition is right, the colors are right, and the whole image is just... dark. Or washed out. Or both across different batches. Meld Auto Exposure looks at the average brightness of your image and applies gamma correction automatically to push it toward a target luminance - no manual curve tweaking, no "add 15 to brightness" guesswork per image.
It's from ComfyUI-Meld, the pack best known for its Image Manager, but this node is one of the plain image-processing helpers that doesn't care about databases at all. Drop it between VAE Decode and Save Image and it just fixes your exposure.
How it works
The node computes the average luminance of the input using the Rec.601 coefficients (the classic luma formula, weighted toward green), compares it to your target_brightness, and derives a gamma value from the gap. Darker than target → gamma below 1 → brighter output. Brighter than target → gamma above 1 → darker output. Then it clamps that gamma to your limits so it can't wreck the image trying to hit the target.
Two knobs steer it:
- target_brightness (default 0.5, range 0.1–0.9) - what "normal" should look like. 0.5 is medium; raise it for brighter results.
- correction_strength (default 0.5, range 0–5) - how hard it pushes toward the target. Set it to 0 and nothing happens (gamma stays 1.0). If the fix is too weak, nudge this up before you widen the gamma limits.
The two optional inputs, gamma_limit_min (0.2) and gamma_limit_max (2.5), are safety rails: they stop the correction from crushing the image into pure black or blowing it out to white.
The outputs that matter
- image - the corrected image. Same size, batch-friendly (each image is analyzed and corrected individually).
- calculated_gamma - the actual gamma applied. Wire this into a text/display node to see what it decided.
- current_brightness - the average luminance it measured before correcting. Handy for diagnosing whether the problem was exposure or something else.
Tips
The intended workflow is one pass: set target_brightness to taste, keep correction_strength around 0.5, and let it ride. If the output looks contrast-crushed, lower the strength instead of raising the target. If a batch of images came out of a too-dark LoRA or model and they all need the same boost, this is a lot less fiddly than a per-image manual fix.
Installing it
Same pack, same install as every Meld node:
- ComfyUI Manager → search "Meld" → install, or
comfy node install HappyOnigiri/ComfyUI-Meld, orcd ComfyUI/custom_nodes && git clone https://github.com/HappyOnigiri/ComfyUI-Meld.git && cd ComfyUI-Meld && pip install -r requirements.txtthen restart ComfyUI.
No models to download, no heavy new deps beyond what the pack already pulls in (imagehash, scipy, PyWavelets for the manager side).
One honest caveat: this is a global luminance fix, so it's not a substitute for regional exposure work - a face that's dark while the background is fine won't be fixed by gamma alone. Use it as the cheap first pass, not the last word.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| correction_strength | FLOAT | 0.500–5 | — |
| target_brightness | FLOAT | 0.500.1–0.9 | — |
| gamma_limit_minopt | FLOAT | 0.200.01–1 | — |
| gamma_limit_maxopt | FLOAT | 2.501–5 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| calculated_gamma | FLOAT | — |
| current_brightness | FLOAT | — |