LoadTrajectory
Reuse a camera path you already liked
- loaded_trajectory
A good camera move is worth keeping. You spent time walking through your point cloud with CameraTrajectoryNode, or you interpolated a path that finally feels right - and next session you want the exact same move on a different scene, or the same scene rendered a different way. LoadTrajectory is the reload button: pick a .npy trajectory file from your input folder and get back the same (N,4,4) pose stack every trajectory node in this pack produces.
It's the load half of the pack's trajectory persistence (SaveTrajectory is the save half), and the README's record_trajectory.json workflow spells out the intended loop: record two poses, interpolate a trajectory, save it for later. This node is how "later" happens.
How it works
The trajectory_file input is a dropdown built from .npy files in ComfyUI's input/ folder, with a file chooser. Select your file and out comes loaded_trajectory, a TENSOR of shape (N,4,4) - one 4×4 camera pose per frame. That tensor drops straight into CameraMotionNode for a point cloud render, into TrajectoryCompose to retarget it relative to a new source pose, or into the video/reframing workflows. No models, no CUDA, no settings - this is the definition of a utility node, and it's meant to be boring.
Two things to keep in mind. First, the file has to be a pose stack in this pack's convention: world-or-camera 4×4 matrices. If you're reusing a trajectory saved by a different tool, check its orientation convention - a path that's flipped or transposed will render as a mirror-image move. Second, the type system: trajectories ((N,4,4)) and point clouds ((N,7)) are different tensor types here, and LoadTrajectory only lists .npy files, so a cloud saved as .npy won't even appear in this node's dropdown. Use LoadPointCloud for clouds.
Install
Shared camera-comfyUI install: Manager → search "camera-comfyUI" → Install, or clone https://github.com/Alexankharin/camera-comfyUI into custom_nodes/ and run python install.py. This node is pure numpy loading - it works even if every heavy optional dependency failed, since it has nothing to do with gsplat, SHARP, or the models.
Troubleshooting
- File not in the dropdown: it's not in
input/, or it isn't.npy. This node only lists.npy; the pack's SaveTrajectory writes exactly that. - Rendered move is mirrored or inverted: the trajectory came from another tool with a different matrix convention. Re-save it in this pack's format (record or interpolate, then SaveTrajectory).
- No trajectory but the file loads: check the shape - it must be
(N,4,4). A single 4×4 or a flattened array won't behave in CameraMotionNode. - Pair it with the recorder: record once with CameraTrajectoryNode, save it, and reuse the move across scenes - that's the workflow this node exists to enable.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| trajectory_file | COMBO | Select a .npy trajectory file to load from your input folder. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| loaded_trajectory | TENSOR | — |