Nodes/radiance/HDR Latent Encoder (Legacy)
ComfyUI Node

HDR Latent Encoder (Legacy)

What it did, and what to use instead

By FXTD-Studios·Created 8 months ago·Updated about 18 hours ago· 246
HDR Latent Encoder (Legacy)
  • image
  • vae
  • latent
  • channel_stats
◄modeSoft-Knee (LTX)►
◄compression_ratio0.50►
◄exposure_offset0.0►
◄energy_normalization1.0►
◄normalize_channelsfalse►
◄norm_center3.0►

Let's not waste your time: this node is deprecated and there's a checkpoint-sized asterisk next to it. It's still shipped, still loads in old graphs, but it's hidden from the menu and it has a problem you need to know before you build anything on it - as of Radiance 3.5.0, no node in the pack decodes this latent back to HDR. The latent-space RUDRA decoders were retired in that release. VAE Decode (HDR) will give you a clipped-at-1.0 image, which is not what you put in.

So: if you're migrating a graph built on Radiance 3.4 or earlier, this node keeps it loading. If you're starting fresh, use VAE Encode (HDR) - VAE Decode (HDR) inverts that one exactly. The author's own node description says as much, which is unusually candid and worth trusting.

What it does

It compresses scene-linear HDR into a distribution a VAE can actually encode. Two modes:

Soft-Knee (LTX) is the default and the LTX-Video-aligned path. It uses an analytically invertible Reinhard blend so it can be undone exactly, and compression_ratio mirrors LTX-Video's tone_map_compression_ratio - 0 is a hard clamp, 1 is full Reinhard. exposure_offset applies an EV shift in scene-linear before compression, so it's a real exposure control rather than a display tweak. Preferred for LTX-Video, WanVideo, and any VAE trained on display-referred 0–1 footage.

Log Calibration is the fallback for VAEs that tolerate a wider input range - Flux and SDXL. It applies log1p plus mean/std distribution calibration, scaled globally by energy_normalization (higher values compress brighter highlights harder).

On top of either mode there's a normalize_channels toggle: per-channel mean/std normalisation before the VAE, mirroring LTX-Video's vae_per_channel_normalize=True. When you turn it on, the stats come out as channel_stats so you can invert them after decode. norm_center (default 3) is the window half-width in sigmas mapped to 0–1; ±3σ suits most HDR content. Leave the toggle off for SDR work - that's the author's own advice, and the mechanism behind it is real: strong colour casts from golden hour, fire or neon can saturate the VAE's latent distribution and decode as banding without it.

Outputs are latent (LATENT) and channel_stats (STRING).

Install

Manager → search Radiance → Install → restart → refresh your browser.

cd ComfyUI/custom_nodes
git clone https://github.com/fxtd-studios/radiance.git
cd radiance
python -m pip install -r requirements.txt

Windows portable users: use python_embeded\python.exe. You need a VAE that matches your model - this node takes one as an input, it doesn't ship its own.

Where people get burned

The decode gap is the whole story. People find this node, encode HDR into a latent, run the model, decode, and get an image that looks like the original SDR with the highlights gone - then assume the encoder failed. It didn't. The decoder that made this round trip is simply not in the 3.5.0 pack any more.

The second thing is that deprecation here is quiet by design: hidden from the menu, still functional in saved graphs, raising a clear error only in specific retired combinations. If you're on a 3.5 build and see it in an old workflow, that's expected, not a broken install.

If you have a 3.4-era graph doing latent-space HDR, the honest advice is to rewrite that branch around VAE Encode (HDR) / VAE Decode (HDR) rather than wait for the latent decoders to come back - the 3.5 migration notes and CHANGELOG cover what moved.

CategoryFXTD STUDIOS/Radiance/Generate

Inputs (8)

NameTypeDefaultDescription
imageIMAGE—
vaeVAE—
modeCOMBOSoft-Knee (LTX)2 options: Soft-Knee (LTX), Log Calibration
compression_ratiooptFLOAT0.500–1[Soft-Knee] 0 = hard clamp, 1 = full Reinhard. Mirrors LTX-Video tone_map_compression_ratio.
exposure_offsetoptFLOAT0.0-10–10[Soft-Knee] EV offset applied in scene-linear before compression.
energy_normalizationoptFLOAT1.00.1–5[Log Calibration] Scale applied before log1p encoding. Higher values compress brighter highlights more aggressively.
normalize_channelsoptBOOLEANfalseApply per-channel mean/std normalisation before VAE encode (mirrors LTX-Video vae_per_channel_normalize). Wire channel_stats → RadianceHDRPerChannelDenorm to invert.
norm_centeroptFLOAT3.01–8[Channel Norm] Window half-width in σ mapped to [0,1]. 3.0 captures ±3σ — suitable for most HDR content.

Outputs (2)

NameTypeDescription
latentLATENT—
channel_statsSTRING—