KJNodes/imagegenerated

HDR Preview KJ(HDRPreviewKJ)

Realtime-exposure preview for HDR-compressed images. Input: LogC3-compressed [0,1] image/video batch (e.g. the VAE-decoded output of an HDR IC-LoRA workflow, prior to HDR decompression). Decompression + exposure + saturation + Reinhard tonemap + sRGB runs in a WebGL fragment shader in the browser for realtime slider feedback, and the same math runs server-side to produce the baked sRGB IMAGE output. Slider changes update the preview immediately; the IMAGE output only updates when the workflow is re-queued.

HDR Preview KJ

image
image
exposure
0.00
saturation
1.00
fps
24.0
input_space
logc3
KJNodes

Description

This node provides a realtime exposure preview for HDR-compressed images and video batches, designed specifically for workflows like IC-LoRA HDR generation. It performs decompression (if needed), exposure adjustment, saturation control, Reinhard tonemapping, and conversion to sRGB — all executed via a WebGL fragment shader in the browser for instant slider feedback. The same mathematical pipeline runs server-side to produce the baked IMAGE output.

Input expectation: A LogC3-compressed image/video in the [0,1] range (e.g., the VAE-decoded output from an HDR IC-LoRA workflow, prior to final HDR decompression). The input_space parameter allows alternative source color spaces.

Important distinction: Slider changes update the preview in real time, but the IMAGE output only reflects current settings when the workflow is re-queued (i.e., the node must execute again to produce the baked result).


Inputs

NameTypeDefaultRange / OptionsTooltip
imageIMAGErequiredLogC3-compressed HDR image/video in [0,1], or linear HDR if input_space is 'linear'.
exposureFLOAT0min: -10, max: 10, step: 0.01Exposure in EV stops. 0 = no change; +1 = 2× brighter.
saturationFLOAT1min: 0, max: 2, step: 0.01Saturation multiplier. 0 = grayscale; 1 = unchanged; 2 = 2×.
fpsFLOAT24min: 1, max: 120, step: 0.1Playback frame rate for video (batch) inputs.
input_spaceCOMBOlogc3['logc3', 'linear', 'srgb']Color space of input: 'logc3' = ARRI LogC3 compressed HDR; 'linear' = linear HDR directly; 'srgb' = already-graded sRGB image (skips Reinhard tonemap).

Outputs

NameTypeDescription
IMAGEIMAGEThe processed sRGB image after exposure, saturation, tonemapping, and color space conversion.

Usage Notes

  • Real-time preview vs baked output: The node renders a live preview in the ComfyUI browser using WebGL. Changes to any slider update this preview instantly. However, the IMAGE output tensor is only recomputed when the node is executed (i.e., when the workflow is re-queued). To get a new baked output after adjusting sliders, you must re-queue the workflow.
  • Color space handling:
    • Use input_space = 'logc3' for typical HDR IC-LoRA outputs (LogC3 compressed).
    • Use input_space = 'linear' if you have already decoded the image to linear HDR values (e.g., after an inverse LogC transform).
    • Use input_space = 'srgb' to bypass all tonemapping — useful if the input is already a display-referred sRGB image and you only want exposure/saturation adjustments.
  • Exposure range: The exposure slider spans ±10 EV stops. At –10 EV the image becomes nearly black; at +10 EV highlights are severely overexposed. Useful for quick HDR inspection.
  • Saturation limit: Saturation values above 1.0 can produce strong, non-physical color boosts. Values below 1.0 desaturate; 0 yields grayscale.
  • Video batches: If the input is a batch of frames (video), set fps to the intended playback frame rate for proper preview timing. This does not affect the output tensor — only the preview player.
  • Performance: The browser preview uses WebGL, which is generally fast. Very large image resolutions or high batch counts may still cause lag. The node itself has no performance impact on the server-side execution beyond the standard ComfyUI forward pass.

Comments

Sign in with GitHub to join the discussion.

Loading comments…
HDR Preview KJ (HDRPreviewKJ) - ComfyUI-KJNodes | ComfyUI Wiki