Nodes/comfyui-ltx2-efficient/LTX2 Combine Audio/Video Latent
ComfyUI Node

LTX2 Combine Audio/Video Latent

Glue the audio back on before decode

By kakachiex2·Created 7 months ago·Updated 7 months ago· 10
LTX2 Combine Audio/Video Latent
  • video_latent
  • audio_latent
  • combined_latent
output_formatnested_tensor

Here's the shape of a low-VRAM LTX-2 audio-video workflow: LTXVConcatAVLatent gives you one combined latent, you split it apart so you can run the video half through the efficient sampler, and now you have a freshly-sampled video latent and an untouched audio latent sitting in two separate wires. This node puts them back together so the decode nodes downstream see one combined latent again. It's LTX2CombineAVLatent, the closing half of the pack's audio-video sandwich.

How it works

The tricky part of combining LTX audio and video isn't the math, it's the type. LTX's official nodes expect a NestedTensor-style object, but a real torch.nested tensor requires all components to share dimensionality - and LTX's video latent is 5D while the audio latent is 4D. So this node wraps the two tensors in an AVLatentWrapper, a small object that mimics the NestedTensor API: unbind() returns [video, audio], values() returns the video, and it exposes .shape, .device, .to(), .clone(), and friends. That makes it drop-in compatible with LTXVSeparateAVLatent and LTXVDecodeAV, which is the whole point.

The inputs

  • video_latent (required) - the processed video latent from your sampler.
  • audio_latent (optional) - the audio latent you stashed away. Leave it unplugged and you get video-only output.
  • output_format - how to package the result:
    • nested_tensor (default) - the wrapper, for anything that expects NestedTensor-style behavior. Use this with the official LTX AV nodes.
    • tuple - a plain (video, audio) tuple, for nodes that accept tuple input.
    • video_only - passthrough, drops the audio entirely.

Output is a single combined_latent (LATENT).

Where it sits

[LTX2SeparateAVLatent] --video_latent--> [LTX2EfficientSampler] -> [LTX2CombineAVLatent] --combined_latent--> [LTXVDecodeAV / LTX2TemporalVAEDecode]
                        --audio_latent-------------------------->/

It's the natural counterpart to LTX2SeparateAVLatent in the same pack - separate, sample, recombine. If you're in a pure video workflow, you can skip both; they only matter when audio is in the picture.

Installation

Same pack, one install: ComfyUI Manager (search "LTX2 Efficient") or:

cd ComfyUI/custom_nodes/
git clone https://github.com/kakachiex2/comfyui-ltx2-efficient
cd comfyui-ltx2-efficient
pip install -r requirements.txt

Restart ComfyUI. No model files or extra dependencies beyond the optional pynvml that the whole pack lists.

Troubleshooting

  • Decode node rejects the combined latent - check output_format. If the downstream node is an official LTX AV node, it wants nested_tensor. If it's some other node that happens to accept tuples, use tuple.
  • Audio missing from the final video - either audio_latent wasn't connected, or the format didn't carry the audio through. Re-verify both.
  • "Unknown format" warnings from the separate node on the other end - the wrapper is designed to be re-separable, so if splitting it again fails, suspect a mismatch between how you combined (format) and what you're splitting with.

It's a glue node - unglamorous, and that's fine. When you're shuttling audio and video around LTX-2 on a tight GPU budget, having the matching combine/split pair is what keeps the whole pipeline connected.

Categoryvideo/ltx2

Inputs (3)

NameTypeDefaultDescription
video_latentLATENT
audio_latentoptLATENT
output_formatoptCOMBOnested_tensor3 options: nested_tensor, tuple, video_only

Outputs (1)

NameTypeDescription
combined_latentLATENT