Nodes/Difforum/Difforum · Guide Builder (Wan VACE)
ComfyUI Node

Difforum · Guide Builder (Wan VACE)

Warp one image into a VACE guide batch, camera by Difforum

By chillithebillis·Created 3 months ago·Updated about a month ago· 7
Difforum · Guide Builder (Wan VACE)
  • anchor_image
  • camera
  • params
  • depth
  • guide_frames
  • occlusion_masks
  • info
warp_modefollow_camera
near1.00
far100.00
invert_depthfalse
translation_scale1.0

Wan 2.2 became the default for local video because of VACE - its video-edit control module that takes per-frame guide inputs (depth, pose, scribble) plus a reference image and steers the generation through them. Difforum · Guide Builder is the node that feeds VACE from the Deforum side. You hand it one anchor image and a Difforum camera track, and it warps that image along the camera path into a full guide_frames batch - every frame a slightly-repositioned version of your anchor, exactly the guide sequence a Wan VACE graph wants. Camera by Difforum, fill by Wan. That's the "Hybrid" render path in the pack's architecture, and it's how you get Deforum-style camera moves on top of a video model's motion quality instead of a feedback loop's.

The mechanism is the same warp engine the Feedback Sampler uses, minus the diffusion. It takes the anchor image and, for each of the max_frames frames, applies the camera pose: 3D warping (with perspective, driven by a depth map if you supply one) or 2D translation/rotation/zoom. Crucially, it also produces occlusion_masks - the areas of the anchor that each warp would reveal as "holes" - so the VACE graph knows where it's genuinely filling new content vs. re-aiming existing pixels. That pair of outputs is the whole trick: guides tell Wan where things are, masks tell it where it has to invent.

The inputs, in order of importance:

  • anchor_image - your starting frame. The node resizes it to the params resolution, so keep it clean and compositionally strong; everything else is derived from it.
  • camera - any Difforum camera track (Move, Shots, Keys, advanced). This is where the "hybrid" magic comes from: write a spiral in Difforum, and Wan renders a spiral with real video-model motion.
  • params - from Anim Setup; defines width/height/frames.
  • warp_mode - follow_camera (use the camera's own mode), or force 2D/3D. If your camera is 3D, follow_camera needs the optional depth input and its friends near/far/invert_depth/translation_scale to actually produce depth motion - same rule as everywhere else in the pack.
  • depth (optional) - unlocks real parallax: near pixels travel faster than far ones.

Outputs: guide_frames (IMAGE batch - wire into the Wan VACE control input), occlusion_masks (MASK batch), and info (STRING with build details and wiring hints).

Install

cd ComfyUI/custom_nodes
git clone https://github.com/chillithebillis/Difforum.git difforum

Restart ComfyUI ([Difforum] loaded N nodes) or ComfyUI Manager → "Difforum". numpy-only. The other half of the pipeline - a Wan 2.2 model + VACE graph - comes from ComfyUI's Wan support or Kijai's WanVideoWrapper, which are separate installs the README lists under helper packs.

Common issues

  • VAE fails at decode - the classic Wan sharp edge. Keep resolutions divisible by 16 (set Anim Setup+ snap=16), or the VAE chokes at the end of the graph.
  • 3D mode produces flat guides - no depth map, or follow_camera on a 2D camera. Provide depth or force 2D.
  • Guides look "stretched" at edges - that's the occlusion mask doing its job; the mask tells Wan to hallucinate the new area, so the seams live in the fill, not the guide.

This is the node that takes Difforum from "retro feedback look" to "modern video-model pipeline." The difforum_hybrid_wan_guides.json template wires it end to end with a GGUF Wan 2.2 - worth running once just to see the two systems stop fighting and cooperate.

CategoryDifforum/hybrid

Inputs (9)

NameTypeDefaultDescription
anchor_imageIMAGE
cameraDIFFORUM_CAMERA
paramsDIFFORUM_PARAMS
warp_modeCOMBOfollow_camera3 options: follow_camera, force_2d, force_3d
depthoptIMAGE
nearoptFLOAT1.000.01–1000
faroptFLOAT100.000.02–10000
invert_depthoptBOOLEANfalse
translation_scaleoptFLOAT1.00–100

Outputs (3)

NameTypeDescription
guide_framesIMAGE
occlusion_masksMASK
infoSTRING