Nodes/ComfyUI_agilly1989_motorway/EmptyCosmosLatentVideo_motorway_edition
ComfyUI Node

EmptyCosmosLatentVideo_motorway_edition

Cosmos video latents on the Motorway

By agilly1989·Created 2 years ago·Updated about a year ago· 7
EmptyCosmosLatentVideo_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
width1280
height704
length121
batch_size1
OUTPUT_LATENT_keyLATENT

An image latent has width and height. A video latent has those plus a third dimension for time, because a video model doesn't denoise 25 separate pictures - it denoises one 5D tensor shaped like [batch, channels, frames, height, width] all at once. EmptyCosmosLatentVideo is the node that makes that blank 5D tensor for NVIDIA's Cosmos video models, sized to the right channel count and temporal compression so the model doesn't choke on it.

This is the Motorway-ed version from agilly1989/ComfyUI_agilly1989_motorway. It creates the latent exactly like the core node would, then stores it on the Motorway pipe under a key instead of handing it to you as a cable.

The inputs that matter

All four are integers, and all four are worth setting:

  • width (default 1280, step 16) - frame width in pixels. Cosmos wants multiples of 16.
  • height (default 704, step 16) - frame height. The 1280×704 default is Cosmos's native-ish 16:9 starting point, but it happily goes up to 16384.
  • length (default 121, step 8) - how many frames. 121 frames at 24fps is roughly a 5-second clip. The latent's temporal axis is compressed 8×, so (length - 1) // 8 + 1 frames actually get stored.
  • batch_size (default 1) - how many clips in the batch. Leave it at 1 unless you know your VRAM has opinions.

The one string input, OUTPUT_LATENT_key (default LATENT), is where the blank latent lands on the Motorway. Downstream, a motorway-ed KSampler or video sampler reads it via its INPUT_latent_key.

How it fits

Text-to-video from scratch, basically. The blank latent is the "empty starting point" the sampler denoises into a clip, so in a Motorway workflow it's usually one of the first things stored: MotorwayStart → this node → the sampler whose INPUT_latent_key points at LATENT. You'll also see it as the fallback canvas for image-to-video when you want the model to invent the whole scene rather than respect a first frame.

Install and the standing caveat

cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway

Restart ComfyUI, or use ComfyUI Manager and search "ComfyUI_agilly1989_motorway." No extra Python packages. The heavy dependency isn't this pack at all - it's the Cosmos model itself (the 7B and 14B checkpoints are multi-GB downloads), plus a compatible VAE and the ComfyUI core support for Cosmos that landed in the comfy_extras/nodes_cosmos.py family.

One more thing, and it applies to every node in this pack: the author's pyproject.toml calls v1.1.7 a "HOTFIX - REMOVED MONKEYPATCH AND GENERATED NODES," and __init__.py ships with the clone registration commented out. The core Motorway system works; the _motorway_edition clones may not be in your menu until that's re-enabled. Don't panic if this one's missing - it's a known beta state, not something you broke.

Categoryagilly1989 Nodes/Motorway-ed/latent/video

Inputs (6)

NameTypeDefaultDescription
widthINT128016–16384
heightINT70416–16384
lengthINT1211–16384
batch_sizeINT11–4096
OUTPUT_LATENT_keySTRINGLATENT
MOTORWAY 🚌💨optMOTORWAY 🚌💨

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨