Nodes/ComfyUI_ColorMod/Tonemap (Mantiuk)
ComfyUI Node

Tonemap (Mantiuk)

High contrast, and a taste for detail

By city96·Created 3 years ago·Updated 2 years ago· 111
Tonemap (Mantiuk)
  • image
  • IMAGE
gamma1.00
scale1.00
saturation1.00
mult1.00

Mantiuk is the aggressive one. Where Reinhard and Drago compress the HDR range with smooth global curves, the Mantiuk operator works on perceived contrast and does it with a lot more bite. The result is often punchier and more detailed - and just as often too contrasty or "crunchy" for the image you actually wanted. It's the tonemap you reach for when the soft operators come out looking washed out and you want the HDR to feel dramatic.

This node wraps OpenCV's createTonemapMantiuk with the pack's shared mult multiplier. Same role in the pipeline as the others: HDR in, [0, 1] SDR out, safe to feed a VAE.

The inputs

  • gamma (default 1.0) - gamma on the output. Your overall brightness shape.
  • scale (default 1.0) - this is Mantiuk's distinctive control: it sets how much fine-detail contrast the operator pushes. Crank it up and textures sharpen up; it's also the easiest way to make everything look overcooked.
  • saturation (default 1.0) - color saturation of the result.
  • mult (default 1.0) - the pack's non-standard multiplier on the final values; the README suggests 2–3 for HDR input.
  • image in, one IMAGE out.

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"). If the node is missing, opencv isn't installed - startup console prints "Can't find opencv!".

What to watch for

  • Start with scale at 1 and don't rush to raise it. The detail push is the node's personality and also its failure mode. If the output looks like a sharpen filter ate your image, dial scale down, not up.
  • Mantiuk's output can be dark. Its contrast behavior tends to sit on the dramatic side; mult at 2–3 (or higher) often fixes the overall exposure after the fact. This is the node where the README's "trial and error" warning applies most literally.
  • SDR input is a waste of it. Like every tonemap here, it's built for HDR. If your image is already [0, 1], use the ColorMod curve nodes for contrast instead - cheaper and easier to reason about.

If you A/B the three operators on the same HDR image, Mantiuk is usually the one that either looks amazing or looks like a bad Instagram filter. There's rarely an in-between. That's the trade for its punch.

CategoryColorMod/tonemap

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
gammaFLOAT1.000–8
scaleFLOAT1.000–8
saturationFLOAT1.000–8
multFLOAT1.000–8

Outputs (1)

NameTypeDescription
IMAGEIMAGE