Tonemap (simple)
The two-knob HDR-to-SDR escape hatch
- image
- IMAGE
Your HDR image has a highlight sitting at 4.0. Your screen tops out at 1.0. Something has to squash that range down to something displayable - that's tonemapping, and Tonemap (simple) is the least-intimidating one in this pack. It wraps OpenCV's createTonemap, the global operator that compresses the whole range into [0, 1] with a gamma curve. Two knobs, no PhD required.
If you're just now finding this node after generating an HDR image, this is likely where it goes next: HDR in → Tonemap (simple) → preview or save. The README is blunt that using HDR images without tonemapping is "probably useless" and can error out, because the VAE and UNet expect [0, 1].
The two inputs that matter
gamma(default 1.0) - the gamma correction applied as part of the mapping. Above 1 brightens the midtones; below 1 darkens. This is where you shape the "feel" of the result.mult(default 1.0) - this one is worth understanding because it's the pack's own addition, not standard OpenCV. It's a multiplier applied to the tonemapped result. For HDR input, the README recommends trying 2–3 here, and credits a learnopencv.com article for the idea. It's effectively a brightness/exposure knob on the final output.
Plus the image input, and a single IMAGE output you can feed to Save Image or back into ColorMod nodes.
Installing
Part of 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"). Missing from the menu → opencv isn't installed.
Notes from the author's own docs
- Tonemapping behaves differently for HDR vs SDR input. Feeding a normal
[0, 1]image through this works, but it's really aimed at HDR. If your image is already SDR, you may get results that look flat or shifted - that's expected, not a bug. - Expect to test. The README says the tonemapping nodes require some testing to get right. The defaults are starting points, not a finish line. Start with
multat 2–3 for HDR, then chasegammafor the midtone look you actually want. - SDR out. This node outputs
[0, 1](it clips after multiplying), so you're safe to wire the result into a VAE or a sampler. That's the entire reason it exists in an HDR workflow.
It's the node to try first when the HDR pipeline feels overwhelming - fewer knobs than Reinhard, Drago, or Mantiuk, and the one that just gets out of your way.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| gamma | FLOAT | 1.000–8 | — |
| mult | FLOAT | 1.000–8 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |