Camera Movement to Prompt
Tell your model exactly how far the camera moved
- original_extrinsics
- new_extrinsics
- prompt
- camera_json
This node solves a weirdly specific problem: you have two 4×4 camera matrices from a 3D scene, and you want a diffusion model to know exactly how the camera moved between them - not "the camera panned right," but "x: 0.15, y: -0.02, z: 0.31, pitch: 5.2, yaw: -12.0, roll: 0.0." CameraMovementToPrompt does the math, serializes the delta as JSON, and stuffs it into a prompt template for you.
The name is a lie in the good way: it doesn't call any API, needs no key, and isn't a control network. It's pure local arithmetic - numpy only - that turns camera math into words a text encoder can read.
Why you'd reach for it
If you're doing 3D Gaussian Splatting work in ComfyUI, you've hit the wall where a render from a fresh camera angle is missing geometry - holes, warped perspective, stuff the splat never saw. The fix is to have an image model restore and repaint that view, and here's the thing: image models are bad at guessing camera deltas. They'll happily hallucinate a "perspective fix" that's nothing like the actual move. Handing them the exact numbers removes the guesswork, the same way the video crowd leans on explicit camera control (AnimateDiff's MotionLoRA pack, Wan's VACE) instead of trusting the model to improvise motion. This node is that idea, but for two-view 3D pipelines.
How it works
You feed it two 4×4 extrinsics matrices - the original view and the new view. It subtracts the translations to get the x/y/z displacement in world space, then computes the relative rotation as R_new @ R_orig^T and converts it to pitch/yaw/roll in degrees (YXZ order). Everything gets rounded to your chosen precision, serialized to JSON, and substituted into the {camera_movement} placeholder in your template.
One nice touch in the source: if either input is missing, it silently substitutes a zero-movement JSON instead of crashing. Handy when a workflow hasn't fully initialized yet.
The inputs that matter
Honestly, you set three things and ignore the fourth:
- original_extrinsics and new_extrinsics -
EXTRINSICStype, from whatever splat/viewer nodes you're using (the author's tooltips name SharpPredict and GaussianViewer). The type comes from those packs, not this one. - prompt_template - any text with
{camera_movement}in it. The default is a decent "restore the perspective of the scene" template, but you'll almost certainly want to write your own, matching the actual restore/outpaint model you're driving. - decimal_places - rounding precision, 0–6, default 2. For tight camera moves, 2 is plenty.
Outputs are prompt (the filled template - wire this into your text encoder / CLIP input) and camera_json (the raw JSON, if you want to log it or use it elsewhere).
Installing it
ComfyUI Manager: search "Camera Movement to Prompt" and install. Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/Lil0k/comfyui_camera_movement_to_prompt.git
Then restart ComfyUI. There are zero Python dependencies - no requirements.txt at all. It uses numpy, which ComfyUI already ships; the author deliberately removed numpy from the package metadata after learning that declaring it made pip "helpfully" upgrade to numpy 2.x and break other nodes. So this one is genuinely dependency-free, which is rarer than it should be in the custom-node world.
Where people get burned
The trap is that EXTRINSICS isn't a built-in ComfyUI type. If you haven't got a Gaussian-splat/viewer pack installed that defines it, you won't even see this node's inputs wireable - the whole thing looks dead. Install the companion packs first.
Second trap: this only helps models that can actually read camera language. If your restore model has never seen "yaw" in its training data, the JSON is just tokens it ignores. It's a prompt-builder, not a control signal. If your results look identical with and without it, that's why - the model is the bottleneck, not the node.
Also note it's early and tiny - one node, one class, a single commit from mid-2026. For a utility this small that's fine, but don't expect a community or a changelog behind it yet.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| original_extrinsics | EXTRINSICS | 4x4 camera extrinsics from the original view (e.g. SharpPredict) | |
| new_extrinsics | EXTRINSICS | 4x4 camera extrinsics from the new view (e.g. GaussianViewer) | |
| prompt_template | STRING | Referring to the scene in image 1, restore the perspective of the scene in image 2. Repair the perspective and missing areas. The camera has moved by: {camera_movement} | Use {camera_movement} as placeholder for the JSON camera delta |
| decimal_places | INT | 20–6 | Number of decimal places for values |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| camera_json | STRING | — |