Nodes/Latent Tools/LTLatentsConcatenate
ComfyUI Node

LTLatentsConcatenate

Stitch Noise Sequences Together for Video

By Machines-of-Disruption·Created about a year ago·Updated 8 months ago· 27
LTLatentsConcatenate
  • latent1
  • latent2
  • LATENT
dim-4

LTLatentsConcatenate joins two latent tensors along the dimension you pick - most usefully the batch dimension, which for video models is frames. This is the node behind the pack's favorite demo: build a 24-frame Stable Video Diffusion sequence out of 10 frames of σ=1 noise, 4 frames of σ=1.2 noise, and 10 more of σ=1, concatenate, and you get a video where one deliberate segment has a different noise character than the rest.

The result of that demo is genuinely strange - the frames with mismatched noise make the model visibly react, sometimes exploding, sometimes wobbling. The author has said outright that mixing noise characters partially confuses the video model. Sometimes that's the artistic point. Sometimes it's the bug. Either way, it's a lever nobody else gives you, and it's how a lot of people started playing with per-segment noise control in video before fancier tools existed.

How it works

A single torch.cat() along dim, no math, no model. For an image latent shaped B, C, H, W:

  • dim 0 (or -4) - batch, which for video is frames. The default.
  • dim 1 (or -3) - channels. Concat here if you're doing exotic channel stitching.
  • dim 2/3 (or -2/-1) - height/width, for building side-by-side or stacked latents.

Negative indexing works, which is why the default -4 is safe across image and video latents - it always means the batch/frames axis.

The inputs that matter

  • latent1, latent2 - the two LATENTs.
  • dim - the concat axis, default -4. Every dimension except this one must match between the two inputs, or torch throws.

Where people get burned

First, the shape rule: if the two latents differ anywhere except the concat axis, it errors. Second, the video-specific trap - video models expect frame counts that fit their temporal padding, so a 10+4+10 = 24-frame batch is fine for SVD, but a frame count like 25 or 13 will fail downstream in the video decoder. And keep the batch geometry in mind: if you concat along width, you've changed the spatial size of the latent, and that size has to stay valid for whatever model you're sampling.

Installing it

Part of xl0's Latent Tools pack. ComfyUI Manager → search Latent Tools → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/xl0/latent-tools

Restart, and it's under LatentTools. The pack's only dependency is lovely-tensors (Manager installs it; manual cloners may need pip install lovely-tensors). No model downloads.

CategoryLatentTools

Inputs (3)

NameTypeDefaultDescription
latent1LATENT
latent2LATENT
dimINT-4-10–10

Outputs (1)

NameTypeDescription
LATENTLATENT