CogVideo ImageEncode FunInP
Image-to-video for the CogVideoX-Fun models
- vae
- start_image
- end_image
- image_cond_latents
This is the image encoder built specifically for the CogVideoX-Fun InP models - the -InP ("inpaint") variants from alibaba-pai's Fun line. It does the same fundamental thing as the regular ImageEncode node - turns a start image into the latent conditioning that drives image-to-video - but it's shaped for how the Fun-InP models expect their conditioning, which is why it has its own node and its own num_frames input.
The Fun line is a family of CogVideoX offshoots that added more flexibility: extra resolutions, aspect-ratio handling, and this inpainting-style image conditioning. The "InP" models treat the start (and optional end) frame like a fill-in-the-gap problem - you give the endpoints, the model generates the frames between them. If you're running a CogVideoX-Fun-*-InP model, this is the encode node it wants; the plain ImageEncode node is for the standard CogVideoX I2V models.
The inputs that matter
vae- the VAE from your loader, required for the encode.start_image- the first frame the video builds from.num_frames(default 49) - and this is the input that sets Fun-InP apart. The encoder needs to know the target clip length up front, because it's laying out conditioning across the whole span, not just anchoring frame one. Set this to match thenum_framesyou'll use on the sampler.end_image(optional) - provide it for first-frame/last-frame generation; the model fills the motion between your two endpoints.noise_aug_strength(optional, default 0) - a little noise on the conditioning to encourage motion; raise it if the output is too static, but not so far that it abandons your image.enable_tiling(optional) - tiles the encode to save VRAM.
The output is image_cond_latents (a LATENT), which plugs directly into the identically named image_cond_latents input on CogVideo Sampler. Note that clean naming match - unlike the standard encoder, this one outputs exactly what the sampler's I2V slot is called.
How to install it
Ships with the wrapper:
- ComfyUI Manager - search ComfyUI-CogVideoXWrapper, install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-CogVideoXWrapper, thenpip install -r ComfyUI-CogVideoXWrapper/requirements.txt, restart.
Common issues & troubleshooting
Which encode node do I use? If your model is a CogVideoX-Fun-*-InP variant, use this one. If it's a standard CogVideoX-5b-I2V or -1.5-I2V, use the plain CogVideo ImageEncode. Pairing the wrong encoder with the wrong model is the main thing that goes sideways here.
num_frames mismatch. If the frame count you set here doesn't line up with the sampler's num_frames, the conditioning and the generation disagree about how long the clip is, and you get truncated or misaligned results. Keep the two numbers the same.
Motion is flat. Same fix as the other encoder: nudge noise_aug_strength up a bit and write a prompt that describes the action, not just the scene. The image sets the look; the prompt sets the movement.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| vae | VAE | — | |
| start_image | IMAGE | — | |
| num_frames | INT | 492–1024 | — |
| end_imageopt | IMAGE | — | |
| enable_tilingopt | BOOLEAN | false | Enable tiling for the VAE to reduce memory usage |
| noise_aug_strengthopt | FLOAT | 0.0000–1 | Augment image with noise |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image_cond_latents | LATENT | — |