Nodes/comfyui-timesaver/TS LTX Final Latent Selector
ComfyUI Node

TS LTX Final Latent Selector

Pick which LTX stage wins before you decode, so the loser never runs

By AlexYez·Created 2 years ago·Updated about 22 hours ago· 12
TS LTX Final Latent Selector
  • stage1_latent
  • stage2_latent
  • latent
use_stage2true

LTX video generation is two-stage: a fast, low-resolution pass that sets the composition, then a full-resolution pass that refines it. If you've built that graph you've also built the annoying bit at the end - decode both latents and throw one away, or wire up a switch that decodes both anyway. TS LTX Final Latent Selector sits before the decode and picks which stage's latent goes on, so only one VAE decode happens. And because its inputs are lazy, the branch you didn't pick is never computed at all - not even the sampler time.

The README's honest note is worth repeating: this node is worth wiring even without HDR. A two-stage LTX graph with an upscaler switch is the exact mess this untangles, and it costs you nothing extra in an SDR workflow.

How it works

The whole thing is one boolean and two optional inputs:

  • use_stage2 - default on. On: you get the full-resolution second-stage latent. Off: it stops after the first stage, and the upscaler and second sampler don't run.
  • stage1_latent - the latent after the first stage, with the guide frames already cropped off.
  • stage2_latent - the latent after the second stage.

Both latent inputs are lazy: ComfyUI doesn't walk into the branch you're not using. Switch use_stage2 off and the second stage stops costing sampler time, not just decoder time.

The single output is latent - the one latent that goes on to the single final decode. That's the whole contract: one decode downstream, one place where the HDR conversion happens, no wasted work.

Installation

This node ships in the comfyui-timesaver pack. ComfyUI Manager: search "Timesaver", install, restart. Or manually:

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 in the node menu.

Why it matters for HDR specifically

In the pack's native HDR path, the final decode is where the scene-linear master gets made - one decode means one place where that conversion happens and one place where it can go wrong. If you decode both stages separately and pick after, you've done the expensive work twice and you've got two competing HDR paths to keep consistent. Selecting the latent first collapses it to one.

If you're not running HDR at all, this still buys you the "switch the upscaler off and the second sampler actually stops running" behavior, which is a real time save on longer clips. It's the rare node that's genuinely useful in both modes.

CategoryTS/Video/HDR

Inputs (3)

NameTypeDefaultDescription
use_stage2BOOLEANtrueOn: the full-resolution second stage. Off: stop after the first stage — the upscaler and second sampler do not run.
stage1_latentoptLATENTVideo latent after the first stage, guide frames already cropped off.
stage2_latentoptLATENTVideo latent after the second stage.

Outputs (1)

NameTypeDescription
latentLATENTThe one latent that goes on to the single final decode.