Nodes/VideoX-Fun/CogVideoX-Fun Sampler for Image to Video
ComfyUI Node

CogVideoX-Fun Sampler for Image to Video

Start/end-frame video on CogVideoX-Fun

By aigc-apps·Created 2 years ago·Updated 20 days ago· 2,174
CogVideoX-Fun Sampler for Image to Video
  • cogvideoxfun_model
  • prompt
  • negative_prompt
  • start_img
  • end_img
  • images
video_length49
base_resolution768
seed43
steps50
cfg6.00
schedulerDDIM

Same naming trap as everywhere else "Inpaint" shows up in this pack: this isn't masked video editing, it's start/end-frame image-to-video generation, and its own display name - "CogVideoX-Fun Sampler for Image to Video" - says so more plainly than the class name does. It pairs with the -InP checkpoints from LoadCogVideoXFunModel, and it's the direct CogVideoX-Fun equivalent of Wan2_2FunInpaintSampler.

Worth knowing: PAI's README specifically calls out that this generation's I2V model had noise added to the reference image during training to increase the motion amplitude of the output - a deliberate fix for an earlier version that generated video that was too static. If your clips here feel like they move more than you'd expect from a still starting image, that's by design, not a bug.

How it works

Feed it a cogvideoxfun_model from an -InP checkpoint, a prompt pair, and a start image (optionally an end image too), and it samples toward a clip anchored at those endpoints using the classic diffusion scheduler you pick - unlike the Wan family, there's no single "Flow" default here.

The inputs that matter

  • cogvideoxfun_model - from LoadCogVideoXFunModel, -InP checkpoint, model_type: Inpaint.
  • prompt / negative_prompt - STRING_PROMPT type; use FunTextBox.
  • start_img (optional, IMAGE) - first frame.
  • end_img (optional, IMAGE) - last frame; connect it for genuine two-point interpolation, leave it disconnected for plain I2V.
  • video_length - default 49, range 5-85, step 4.
  • base_resolution - 512/768/960/1024, default 768.
  • steps - default 50, up to 200.
  • cfg - default 6, range 1-20.
  • scheduler - Euler, Euler A, DPM++, PNDM, or DDIM, default DDIM.

Output: images - a frame batch.

Installing it

No separate install from the base pack. Search ComfyUI Manager for VideoX-Fun; if it's not there:

cd ComfyUI/custom_nodes
git clone https://github.com/aigc-apps/VideoX-Fun
pip install -r VideoX-Fun/requirements.txt

Restart ComfyUI.

Common issues

Looking for a mask input. There isn't one - this is start/end-frame prediction only, no region-based editing. If you need masked inpainting on video, this pack doesn't offer it.

Motion feels more chaotic than you expected from a calm reference image. That's the documented trained-in behavior of this checkpoint generation - noise added to the reference image during training specifically to push motion amplitude up versus the original CogVideoX-Fun. If it's too much for your shot, try the earlier non-V1.1 checkpoints in LoadCogVideoXFunModel, which don't have this retraining.

Wrong checkpoint paired. This sampler expects model_type: Inpaint (an -InP checkpoint). A -Pose or -Control checkpoint from LoadCogVideoXFunModel wants CogVideoXFunV2VSampler instead.

video_length capped at 85. That's the hard ceiling for this whole model family - there's no RIFLEx-style extension option wired into the CogVideoX-Fun nodes, unlike the Wan samplers in this pack.

Prompt inputs won't wire up. STRING_PROMPT type - needs FunTextBox.

CategoryCogVideoXFUNWrapper

Inputs (11)

NameTypeDefaultDescription
cogvideoxfun_modelFunModels
promptSTRING_PROMPT
negative_promptSTRING_PROMPT
video_lengthINT495–85
base_resolutionCOMBO7684 options: 512, 768, 960, 1024
seedINT430–18446744073709550000
stepsINT501–200
cfgFLOAT6.001–20
schedulerCOMBODDIM5 options: Euler, Euler A, DPM++, PNDM, DDIM
start_imgoptIMAGE
end_imgoptIMAGE

Outputs (1)

NameTypeDescription
imagesIMAGE