Latent Trajectory (LRW)
Roll a latent forward in time
- latent_start
- metric
- latent_trajectory
Most of the pack answers "how do I get from latent A to latent B." Latent Trajectory asks a weirder question: "what happens if I just... let a latent move?" It takes a single starting latent, gives it a random velocity, and rolls it forward in time through latent space using the metric as the terrain. The result is a trajectory - a sequence of latents that pretend to be frames of motion. This is the most experimental node in comfyui-lrw-nodes, and you should treat it accordingly.
How it works
Under the hood it uses lrw.world.LatentStateSpace, which models latent-space motion as geodesic flow rather than straight-line extrapolation. The starting velocity is random noise scaled by velocity_scale, and the state space rolls out n_steps steps of size dt, with optional noise_scale for stochasticity and a seed to make it repeatable. Output is a single latent_trajectory with (n_steps + 1) × B items - the start state plus one per step - which you can decode to a sequence or slice with LRW_LatentBlend.
Inputs:
latent_start- where the motion begins (e.g. VAEEncode of your first image).metric- required, from the VAE Decoder Bridge or Pullback Metric.n_steps(default 10) - how many frames forward to roll.dt(default 0.1) - step size of the integration; smaller is smoother and slower.velocity_scale(default 0.1) - how much initial kick. Zero gives you... zero motion, which is a fun first experiment.noise_scale(default 0) - adds random perturbations along the way.seed- reproducibility.
The honest reality
This is the "world model" sandbox node - the README's own category is lrw/world, and it's the least battle-tested thing here. Two things to know before you invest an evening. First, random-velocity latent rollouts don't reliably produce coherent imagery; you'll often get a plausible first frame, then a drift into noise or mush, because nothing is steering the trajectory toward "things that look like images." It's a research tool for probing the geometry, not a video generator. Second, it needs the real pullback metric (expensive, image-model path) - WAN's VAE can't do it cheaply, so there's no WAN counterpart. If your interest is practical WAN video, go read LRW_WanGeodesicKeyframes instead. If you're genuinely curious about what "motion" means in a curved latent space, this is a fun hour.
Install
Part of comfyui-lrw-nodes by lajjadred, the ComfyUI face of his latent-riemannian-world package. Search the pack in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/lajjadred/comfyui-lrw-nodes
cd comfyui-lrw-nodes
pip install -r requirements.txt
Restart ComfyUI. Real deps: latent-riemannian-world >= 0.3.0, torch >= 2.4, Python 3.12+. Early builds had registration/import bugs that made nodes show as broken or UNKNOWN - fixed upstream; git pull + full restart, and keep only one copy of the pack in custom_nodes. License is BSL-1.1.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| latent_start | LATENT | — | |
| metric | METRIC | — | |
| n_steps | INT | 101–60 | — |
| dt | FLOAT | 0.100.01–1 | — |
| velocity_scale | FLOAT | 0.100–1 | — |
| noise_scale | FLOAT | 0.000–1 | — |
| seed | INT | 00–4294967295 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent_trajectory | LATENT | — |