ComfyUI Node

🍒HDR🌈

KimHDR fakes a multi-exposure merge from one flat image — and can do it well

By wjl0313·Created 2 years ago·Updated 11 months ago· 54
🍒HDR🌈
  • image
  • IMAGE
HDR强度1.00
欠曝光因子0.80
过曝光因子1.00
gamma0.90
高光细节0.03
中间调细节0.25
阴影细节2.0
整体强度0.50

"HDR" is a loaded word. Real HDR means bracketing - several exposures of the same scene - and this node doesn't have that. What KimHDR does is simulate the whole pipeline on a single image, and "simulate" is doing a lot of work here because the mechanism is more honest than most fake-HDR filters you'll find.

It's in the Filter section of the KimNodes pack, and it's aimed at the same job that doc-style grading tools chase: pull detail out of shadows and highlights without the whole image turning into a neon grey mush. On a flat, washed-out render it can add real depth. On an already punchy image it mostly just adds drama, so keep the blend knob in mind.

How it works

The node takes your one image and manufactures three versions of it: an underexposed copy (scaled by 欠曝光因子), the original, and an overexposed copy (scaled by 过曝光因子). Those three fake exposures go into OpenCV's Debevec HDR merge, which fuses them into a single high-dynamic-range frame, and then a Reinhard tone mapper brings it back to displayable range with the gamma you set.

Then the clever part: the result is blended with the untouched original by 整体强度. That's the real control. At 0 you get your original back; at 1 you get the full HDR treatment. Everything else is fine-tuning that blend.

The inputs that matter

Honestly, for a beginner, two of the nine do the job:

  • 整体强度 (overall strength, 0–1) - how much of the processed result survives the final blend. Start at 0.3–0.5.
  • HDR强度 (0.5–3) - the punch of the tone-mapped result itself.

The rest are set-and-forget: 欠曝光因子 (0–1) and 过曝光因子 (1–2) control how far the synthetic exposures stretch; gamma (0.1–3) sets the tone mapper's curve. The three "detail" knobs - 高光细节, 中间调细节, 阴影细节 - are nominally highlight/midtone/shadow detail, but here they're passed straight into the Debevec merge as exposure times, which is a slightly odd way to use them. Nudge them if you like, but they're not the intuitive "shadow recovery" sliders the names suggest.

Output is a single IMAGE, ready to feed a save node or a further color pass.

Installation

Standard pack install - ComfyUI Manager, search "ComfyUI_KimNodes", install, restart, or clone the repo into custom_nodes:

cd ComfyUI/custom_nodes && git clone https://github.com/wjl0313/ComfyUI_KimNodes

This node needs OpenCV (cv2), which is not in the pack's requirements.txt. ComfyUI environments usually pick it up as a transitive dependency of something else; if the whole pack fails to appear after install, that's the cause.

Where people get burned

The failure mode here is nasty in a specific way: if anything in the OpenCV pipeline throws, the node's try/except swallows the error and returns a solid black image. You will not get a red error in the console that says "cv2 missing" - you'll get a black frame and wonder why your workflow is broken. If you see black output from KimHDR, check the terminal log for the exception rather than assuming your image was too dark.

Category🍒 Kim-Nodes/🎨Filter | 滤镜

Inputs (9)

NameTypeDefaultDescription
imageIMAGE
HDR强度FLOAT1.000.5–3
欠曝光因子FLOAT0.800–1
过曝光因子FLOAT1.001–2
gammaFLOAT0.900.1–3
高光细节FLOAT0.030.001–1
中间调细节FLOAT0.250.001–1
阴影细节FLOAT2.00.001–10
整体强度FLOAT0.500–1

Outputs (1)

NameTypeDescription
IMAGEIMAGE