Nodes/ComfyUI_ColorMod/Exposure Fusion
ComfyUI Node

Exposure Fusion

No calibration, no exposure math

By city96·Created 3 years ago·Updated 2 years ago· 111
Exposure Fusion
  • image_a
  • image_b
  • image_c
  • image_d
  • IMAGE

Most of this pack's HDR nodes are a project. Create HDR image needs exposure guesses, calibration, and a tonemap afterwards - genuinely fiddly. Exposure Fusion is the opposite: it takes two to four images at different brightnesses and merges them straight into a normal, viewable, [0, 1] result. No exposure values to guess, no calibration, no mandatory tonemapping step after. It's the node you reach for when you want the benefit of an HDR merge - shadows from the bright pass, highlights from the dark one - without any of the HDR ceremony.

How it works

It uses OpenCV's Mertens fusion (createMergeMertens), which scores each input pixel by contrast, saturation, and well-exposedness and blends accordingly. The clever part: it's exposure-invariant, so it doesn't need to know what exposure each input represents. That makes it perfect for AI images, where "exposure" is a fiction anyway. The output is already a merged SDR image in [0, 1] - you can look at it immediately, no tonemapping required.

Inputs and output

  • image_a - required. The other three, image_b, image_c, image_d, are all optional. Plug in two, three, or four versions of the same scene at different brightness.
  • Output: IMAGE, the fused result.

That's the whole interface. No sliders. If you want knobs, this isn't the node.

The workflow

Same recipe as every multi-pass merge: generate the scene at different brightness levels, then fuse. The README's warning applies here too - different diffusion passes at different brightness can drift apart and recombine with artifacts, so keeping them aligned with ControlNet (or similar conditioning) is the difference between a clean merge and a smeary one. All inputs must be the same resolution and batch size; the node throws "Batch size mismatch!" otherwise.

Installing

From the ColorMod pack, needs OpenCV:

cd ComfyUI/custom_nodes
git clone https://github.com/city96/ComfyUI_ColorMod
cd ComfyUI_ColorMod
pip install -r requirements.txt

Restart, or install via ComfyUI Manager ("ComfyUI_ColorMod"). Node missing → opencv not installed; the console prints "Can't find opencv!" at startup.

Should you use this or Create HDR image?

Short version: Exposure Fusion first. It's faster, has no exposure inputs to get wrong, and its output is directly viewable. Create HDR image only wins when you specifically want a real HDR intermediate - a floating-point file you'll grade, save as .hdr, or tonemap yourself with a specific operator. For "I just want the merged image," exposure fusion is the one you'll actually reach for, and honestly the one most people mean when they say they want the HDR look.

CategoryColorMod/hdr

Inputs (4)

NameTypeDefaultDescription
image_aIMAGE
image_boptIMAGE
image_coptIMAGE
image_doptIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE