Nodes/ComfyUI-CogVideoX/CogVideoX Image-2-Video Extended
ComfyUI Node

CogVideoX Image-2-Video Extended

Stretch CogVideoX past its 2-second ceiling in one node

By florestefano1975·Created 2 years ago·Updated about a year ago· 15
CogVideoX Image-2-Video Extended
  • image
  • video_out
prompt
num_frames49
num_inference_steps10
guidance_scale6.00
use_dynamic_cfgtrue
seed0
interpolation_factor3
flow_precision0.5
motion_threshold0.10
smoothness0.5
flow_method
edge_mode
interpolation_strength1.0
upscale_factor1.00

CogVideoX was the first open model that made local video generation feel real - before Wan came along and moved the goalposts. This node is from that era, and it does something the base model never could: it keeps generating past the native 49-frame window (about two seconds), then smooths and optionally upscales the result, all inside a single ComfyUI node. No pipelines, no extra wrappers, no missing pieces to hunt down. Drop in an image, write a prompt, hit run.

The honest caveat up front: if you're starting fresh in 2026, Wan is the better-looking default, and this whole pack is stamped "experimental" by its own README. Reach for this if you specifically want CogVideoX 5B without assembling a wrapper workflow - it's a complete, self-contained image-to-video chain that downloads its own model.

How "Extended" actually works

The node runs THUDM/CogVideoX-5b-I2V through Diffusers at a fixed 720×480, but it never generates your full clip in one pass. It works in 49-frame segments (the model's native context), and each new segment conditions on the last frame of the previous one as its starting image. That chaining loop is the entire "video duration extension" - it keeps looping until you hit your requested length.

Then the interesting part: after generation, every pair of adjacent frames goes through OpenCV optical-flow interpolation. The node computes the motion between two frames (DIS by default, or Farneback / TV-L1) and warps and blends interpolation_factor synthetic frames in between. That's real frame synthesis, not just a slow-motion cheat - it genuinely turns a 2-second clip into a 6-second one at the same motion speed. Last, upscale_factor (1.0–2.0) resizes everything with Lanczos. Your input image is center-cropped to 720×480 before anything runs, so don't expect your exact composition to survive.

The inputs that matter

  • prompt and image - the two you always set. The image sets the first frames; the prompt steers everything after.
  • num_frames - how many base frames to generate. It gets silently rounded down to a multiple of 49, so 60 becomes 49. The real deliverable is longer anyway, because of interpolation.
  • num_inference_steps (default 10) - the model's DPM scheduler with trailing timesteps is step-efficient, but 10 is aggressive; 20–30 noticeably cleans up quality if you have the patience.
  • guidance_scale (default 6.0) - how hard it follows the prompt. Up = faithful but artifact-prone.
  • seed - same seed, same params, same output. Set it if you're iterating.
  • The interpolation block: interpolation_factor is the big one - it's how many in-between frames get added per original pair (default 3 → 4× the frames, so 49 base frames become ~193). motion_threshold ignores tiny movements, interpolation_strength controls how hard the warp applies. If motion looks mushy, drop strength or raise the threshold.

One trap the README sets for you: it claims interpolation_factor defaults to 1, but the shipped code ships 3. The node is the source of truth - and it's also why your first render comes back with roughly 4× more frames than you asked for.

The single output, video_out (type VIDEO), is a list of frames that wires straight into CogVideoX Save Video - the pack's own output node, since no other pack shares this custom VIDEO type.

Installing it

Via ComfyUI Manager, search ComfyUI-CogVideoX. Or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/florestefano1975/ComfyUI-CogVideoX
# then restart ComfyUI

First run downloads the ~18 GB CogVideoX-5b-I2V model into ComfyUI/models/CogVideoX/ automatically - the console will show progress, and it's a long wait on slow connections.

Where people get burned

  • "No module named cv2" is the classic. The code imports OpenCV (cv2) but requirements.txt never lists it. Fix it once, fix it forever: pip install opencv-python (or python_embeded\python.exe -m pip install opencv-python on Windows).
  • It's a 5B model, though it uses bf16 with sequential CPU offload and VAE slicing/tiling, so it runs on modest GPUs. The cost is time - community reports put a single CogVideoX-5b-I2V clip at around 30 minutes on a 3090, and chaining + interpolation only adds to that. Bring system RAM, not just VRAM.
  • Interpolation artifacts: fast motion warps and ghosts. Lower interpolation_strength, raise motion_threshold, or drop to interpolation_factor 1.
  • TV-L1 and DIS silently fall back to Farneback on some OpenCV builds - the node prints a warning, and your "TV-L1" render is running Farneback.
  • Updates have changed the node's parameters (1.3 added interpolation, 1.4 added upscale), so old saved workflows can break after an update. It's experimental; that's the deal.
CategoryAI WizArt/CogVideoX

Inputs (15)

NameTypeDefaultDescription
promptSTRING
imageIMAGE
num_framesINT4949–2147483647
num_inference_stepsINT101–1000
guidance_scaleFLOAT6.000.1–30
use_dynamic_cfgBOOLEANtrue
seedINT00–99999999999999
interpolation_factorINT31–7
flow_precisionFLOAT0.50.1–1
motion_thresholdFLOAT0.100–1
smoothnessFLOAT0.50–1
flow_methodCOMBO3 options: DIS, Farneback, TV-L1
edge_modeCOMBO4 options: Replicate, Reflect, Wrap, Constant
interpolation_strengthFLOAT1.00–1
upscale_factorFLOAT1.001–2

Outputs (1)

NameTypeDescription
video_outVIDEO