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

TS LTX HDR Guide

One node per guide frame that feeds both LTX stages — and never runs the wrong branch

By AlexYez·Created 2 years ago·Updated a day ago· 12
TS LTX HDR Guide
  • config
  • sdr_image
  • hdr_linear
  • image_guide
  • stage1
  • stage2
  • info
stage1_width960
stage1_height544
stage2_width1920
stage2_height1088
fit_modecenter_crop
interpolationarea

In the two-stage LTX workflow, each stage needs its own prepared guide frame - the half-resolution first stage wants a guide built at half resolution, the full-resolution second stage wants one at full resolution. Doing that by hand means rebuilding image conditioning twice, and doing it wrong quietly wrecks the HDR path. TS LTX HDR Guide is one node per guide frame (first, last) that prepares both stage guides at once, from an EXR when HDR is on and from the ordinary SDR chain when it's off.

The trick that makes it safe is that the unused branch is never computed. With HDR off, ComfyUI never walks into the EXR branch; with HDR on, the LTXVPreprocess SDR chain is never computed. A broken EXR path cannot break an SDR run, which is the kind of guarantee that keeps a two-mode graph from becoming a two-mode headache.

How it works

The config settings node's enabled switch picks the branch. Off: your existing SDR chain (including LTXVPreprocess) passes through. On: two guides are built from the EXR loader's hdr_linear input.

The detail that matters most: the half-resolution guide is built from the original EXR, not by shrinking the full one. The official two-stage pipeline rebuilds conditioning for each resolution, and that's not the same thing - averaging belongs in linear light, not in log codes. Build the half-res guide by shrinking the full one and you've baked in a subtle color error.

There's also strict validation: stage sizes must match one of the two legal wirings - the same size (no latent upscaler) or exactly double (with the x2 upscaler). A mismatch stops the run instead of producing a master nobody can use.

Inputs that matter

  • config - the settings node.
  • stage1_width/height and stage2_width/height - the two stages' dimensions (defaults 960×544 and 1920×1088).
  • fit_mode - center_crop fills the frame and trims edges (the default); reflect_pad fits the whole picture and invents the margins.
  • interpolation - area by default, the safe averaging choice for shrinking.
  • sdr_image - the existing SDR chain, used only when HDR is off.
  • hdr_linear - the EXR loader's output, used only when HDR is on.
  • image_guide - an ordinary JPG/PNG to guide an HDR run when you have no EXR. Used when HDR is on and hdr_linear isn't connected.

Outputs: stage1 and stage2 guides, plus info - which branch ran and what it produced.

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 SDR-still caveat, in plain words

The image_guide path is supported, and the README is refreshingly blunt about it: an 8-bit picture holds nothing above 1.0, and no curve invents what was never captured. What you do get is still worth it - the gamma is removed properly (feeding sRGB codes in as linear light is off by up to 2.3 stops in the shadows), the master stays float32 scene-linear with no banding, and SDR white sits at about 0.555 of the ACEScct range, leaving roughly 45% of the range - about 7.8 stops - above it for the model to generate into. Whether it actually does is exactly what TS LTX HDR Stats exists to answer.

CategoryTS/Video/HDR

Inputs (10)

NameTypeDefaultDescription
configTS_LTX_HDR_CONFIGSettings node. Its enabled switch picks the branch.
stage1_widthINT96032–16384Width of the half-resolution first stage.
stage1_heightINT54432–16384Height of the half-resolution first stage.
stage2_widthINT192032–16384Width of the full-resolution second stage.
stage2_heightINT108832–16384Height of the full-resolution second stage.
fit_modeCOMBOcenter_cropcenter_crop fills the frame and trims the edges; reflect_pad fits the whole picture and invents the margins.
interpolationCOMBOareaarea averages by coverage when shrinking — the safe default.
sdr_imageoptIMAGEThe existing SDR chain, LTXVPreprocess included. Used only when HDR is off, and not computed at all when it is on.
hdr_linearoptTS_LTX_HDR_IMAGEThe EXR loader. Used only when HDR is on, and not read at all when it is off — a broken EXR path cannot break an SDR run.
image_guideoptIMAGEAn ordinary picture (JPG/PNG) to guide an HDR run when you have no EXR. Used only when HDR is on and hdr_linear is not connected. The gamma is removed properly — treating the codes as linear light is off by up to 2.3 stops in the mid-tones. It adds no headroom: white stays at 1.0, and whether the model generates anything brighter is for TS LTX HDR Stats to say.

Outputs (3)

NameTypeDescription
stage1IMAGEGuide for the half-resolution stage.
stage2IMAGEGuide for the full-resolution stage, prepared independently.
infoSTRINGWhich branch ran, and what it produced.