Nodes/ViewCrafter-ComfyUI/ViewCrafterTxTNode
ComfyUI Node

ViewCrafterTxTNode

ViewCrafterTxTNode

By AIFSH·Created 2 years ago·Updated 2 years ago· 8
ViewCrafterTxTNode
  • img
  • result_video
  • traj_video
traj_txt
video_length
ddim_steps50
center_scale1.00
elevation5.00
d_theta-30
d_phi45
d_r-0.50
seed42
custom_traj_txt0 -40 0 0 0. -0.2

One image in, a moving camera out

Give this node a single image and it hands you a short video where the camera actually flies around the scene - orbiting left, looping, zooming in - while the subject stays put and keeps its identity. This is the "2.5D photo" trick, and it's the whole reason ViewCrafter made a splash back in September 2024: at the time, most image-to-video models just added motion on top of the flat image, and here was something that reconstructed real 3D geometry first.

It's a ComfyUI port by AIFSH of the ViewCrafter model (github.com/Drexubery/ViewCrafter). AIFSH is a prolific Chinese node author who wraps outside models into graph nodes - Hallo, OmniGen, F5-TTS and friends. The pattern with their packs is "it works, but expect the occasional rough edge," and this one is no exception. It's genuinely cool, and also genuinely old news by now: the reddit buzz was basically a launch-week blip before Wan and friends took over the video conversation. Reach for it when you want camera motion with real parallax - a statue you can circle, a product shot that swings around - not when you want a generic motion video.

How it actually works

There's real geometry under this. The node feeds your image to DUSt3R, which estimates depth and camera pose and builds a 3D point cloud of the scene. It then picks a camera trajectory, renders the point cloud from each new pose (those renders are rough and holey - that's normal), and runs ViewCrafter's video diffusion model over the frames to inpaint them into clean, consistent novel views. First frame is your original image; if your trajectory ends back at zero deltas, the last frame returns to it too, which is how loop1 closes.

The trajectory itself is just a text file with three lines - phi (azimuth), theta (elevation), r (zoom) - one value per frame. That's the whole control surface, and it's where this node is deceptively simple.

The inputs that matter

You mostly touch three things:

  • img - any IMAGE tensor. The node auto-resizes it to a 1024-wide 576-high internal frame.
  • traj_txt - pick left, loop1, loop2, wave1, or zoomin1.
  • video_length - 25 or 16 frames, and note it switches the checkpoint: ViewCrafter_25 vs ViewCrafter_16, both downloaded on first use.

Then seed, ddim_steps (default 50), center_scale (how far the orbit swings, 0–2) and elevation (camera height). The real gotcha: d_theta, d_phi, d_r do nothing here. They're carried over from ViewCrafter's other camera modes, but in this node the trajectory comes entirely from the text file - the source wires them in but never reads them on this path. Don't waste an afternoon wiggling those sliders.

custom_traj_txt (optional, multiline) is the escape hatch. It defaults to 0 -40 / 0 0 / 0. -0.2, which is exactly the left preset. Change any of it and the node writes your own trajectory file. Format: three lines of space-separated numbers, column per frame - see the ViewCrafter render_help.md for the full syntax.

Outputs

Two VIDEO wires: result_video (the polished diffusion output) and traj_video (a visualization of the camera path over your image). The pack also ships PreViewVideo and LoadVideo nodes so you can actually see these in the graph - the result lands in output/viewcrafter/.

Installing it

ComfyUI Manager (search "ViewCrafter") or:

cd ComfyUI/custom_nodes
git clone https://github.com/AIFSH/ViewCrafter-ComfyUI

then restart ComfyUI. The heavy part comes at first run: it auto-downloads the ViewCrafter checkpoints from HuggingFace plus the ~2GB DUSt3R ViT-Large weights via wget into the pack's checkpoints/ folder. Requirements pin a 2024-era environment (numpy 1.23.5, Pillow 9.4, opencv 4.7, pytorch-lightning 1.9.3, plus roma/kornia) - on a fresh, modern ComfyUI these pin fights are the most common source of breakage. And this is a 1024×576 diffusion over a point cloud; the README's example ran on a 4090D, so don't expect this on a 6GB card.

If nothing happens when you run it, check that the checkpoint download actually finished (no output = the wget silently failed) - that's the classic first-run failure here.

CategoryAIFSH_ViewCrafter

Inputs (11)

NameTypeDefaultDescription
imgIMAGE
traj_txtCOMBO5 options: left, loop1, loop2, wave1, zoomin1
video_lengthCOMBO2 options: 25, 16
ddim_stepsINT50
center_scaleFLOAT1.000–2
elevationFLOAT5.00
d_thetaINT-30-40–40
d_phiINT45-45–45
d_rFLOAT-0.50-0.5–0.5
seedINT42
custom_traj_txtoptSTRING0 -40 0 0 0. -0.2

Outputs (2)

NameTypeDescription
result_videoVIDEO
traj_videoVIDEO