Nodes/comfyui-timesaver/TS LTX HDR Decode
ComfyUI Node

TS LTX HDR Decode

The one decode that gives you both a watchable preview and a true HDR master

By AlexYez·Created 2 years ago·Updated a day ago· 12
TS LTX HDR Decode
  • samples
  • config
  • sdr_vae
  • hdr_vae
  • preview_sdr
  • hdr_linear
  • info
tiledtrue
tile_size512
overlap64
temporal_size128
temporal_overlap32

At the end of a two-stage LTX graph you normally have a pair of VAEDecode nodes, one per stage, and you pick. In the native HDR path there is exactly one final decode, and TS LTX HDR Decode is it - with two outputs that must never be confused.

  • preview_sdr - what you look at. Tonemapped, exposure applied, sRGB encoded. Send this to the video saver.
  • hdr_linear - what you save. Scene-linear Rec.709 float32 with highlights above 1.0 intact, no tonemap, no gamma, no upper clamp. No preview setting touches it.

The whole point of the HDR path is that the range you brought in survives to the master, and this node is where that happens - or doesn't. If you save preview_sdr thinking it's the HDR file, you've thrown the range away and nothing will tell you.

How it works

With HDR on, the decode runs in float32 and converts the ACEScct working signal back into scene-linear light. The decode comes out as an ACEScct working signal in [0, 1] - which is why ComfyUI's standard (x + 1) / 2 clamp on the LTX VAE costs nothing here; the range reappears on the inverse curve after the decoder.

With HDR off, it's an ordinary decode - and the hdr_linear output returns an ExecutionBlocker, so a connected EXR saver doesn't run at all. No stub file, no black frames, nothing. That's a deliberate design: when the HDR path is off, it's really off.

Decoding long clips in float32 gets heavy, so there are tiling controls: tiled (default on) with tile_size (512), overlap (64), temporal_size (128) and temporal_overlap (32) - how many frames decode at a time and how much they overlap to hide seams. On a 129-frame 1920×1088 clip these are the difference between fitting in VRAM and not.

Inputs and outputs

  • samples - the one latent chosen before decoding (from TS LTX Final Latent Selector).
  • config - the settings node; its enabled switch selects the mode.
  • sdr_vae - the VAE the rest of the graph uses. Needed only when HDR is off.
  • hdr_vae - the float32 VAE from TS LTX HDR VAE. Needed only when HDR is on, and not loaded at all when it's off (that input is lazy).
  • Plus the tiling controls above.

Outputs: preview_sdr, hdr_linear, and info - a string saying what came out and what looks wrong.

Installation

Part of the comfyui-timesaver pack. Install via ComfyUI Manager (search "Timesaver") or:

cd ComfyUI/custom_nodes
git clone https://github.com/AlexYez/comfyui-timesaver
cd comfyui-timesaver
python -m pip install -r requirements.txt

Restart ComfyUI. It's under TS/Video/HDR.

The habit that saves the shot

Run TS LTX HDR Stats on the master the first time you do a shot. Lost HDR looks completely normal - the picture is fine, the file was written, there's just nothing above 1.0 in it, and you discover that in the edit when someone tries to pull the sky back. The stats node tells you in seconds whether the range actually survived. And wire the two outputs to the right places: preview to your monitor/saver, hdr_linear to the EXR saver. Swap them once and you'll never forget which is which.

CategoryTS/Video/HDR

Inputs (9)

NameTypeDefaultDescription
samplesLATENTThe one latent chosen before decoding.
configTS_LTX_HDR_CONFIGSettings node.
tiledBOOLEANtrueDecode in tiles. Keeps long clips inside VRAM.
tile_sizeINT51264–4096Tile side in pixels.
overlapINT640–4096Overlap between tiles, to hide the seams.
temporal_sizeINT1288–4096How many frames are decoded at a time.
temporal_overlapINT324–4096How many frames overlap between those groups.
sdr_vaeoptVAEThe VAE the rest of the graph already uses. Needed only when HDR is off.
hdr_vaeoptVAEThe float32 VAE from TS LTX HDR VAE. Needed only when HDR is on, and not loaded at all when it is off.

Outputs (3)

NameTypeDescription
preview_sdrIMAGETone-mapped for looking at. Send this to the video saver.
hdr_linearTS_LTX_HDR_IMAGEScene-linear Rec.709 float32 master, highlights above 1.0 intact. Blocked entirely while HDR is off.
infoSTRINGWhat came out, and what looks wrong.