CogVideo Sampler
The node that actually makes the video
- model
- positive
- negative
- samples
- image_cond_latents
- context_options
- controlnet
- tora_trajectory
- fastercache
- feta_args
- teacache_args
- samples
This is the engine room. Everything else in a CogVideoX workflow - loading the model, encoding your prompt, encoding a start image, tuning caches - exists to feed this node. It takes the model and your conditioning, runs the denoising loop, and outputs a latent that CogVideo Decode turns into actual frames. If you only understand one node in the pack, make it this one.
Mechanically it's the same diffusion-sampling idea you know from image workflows, just over a stack of video frames: start from noise, denoise over N steps guided by your prompt, land on a clean latent. What's different is that it's denoising time as well as space, so all the video-specific machinery - context windows, temporal caches, motion trajectories - hangs off the optional inputs here.
The inputs that matter
The required ones are where a beginner should focus:
num_frames(default 49) - the length of your clip in frames. CogVideoX is happiest around its native 49; push it much higher and you'll want the context-options node to keep quality from falling apart.steps(default 50) - denoising steps. More steps, more refinement, more time. 50 is generous; you can often drop to 30-ish without much loss.cfg(default 6) - how hard the model chases your prompt versus doing its own thing. 6 is a solid middle. Too high and motion gets stiff and over-cooked; too low and it drifts off-prompt. This is the dial you'll tune most.scheduler(defaultCogVideoXDDIM) - the sampling algorithm. TheCogVideoXDDIMandCogVideoXDPMScheduleroptions are tuned for this model; the others (Euler,DPM++,DDIM,LCM, etc.) are there to experiment with. Start with the default.positive/negative- theCONDITIONINGfrom your CogVideo TextEncode nodes.seeddoes what it always does.
The optional inputs are the plug board for the rest of the pack. image_cond_latents takes the output of CogVideo ImageEncode for image-to-video. samples plus denoise_strength enable video-to-video (feed an existing latent and denoise partially). context_options connects the long-video windowing node, controlnet the ControlNet apply node, tora_trajectory a Tora motion path, and fastercache / feta_args / teacache_args the three acceleration-and-quality helpers. Wire in only what your workflow uses; they're all optional.
The one output, samples (a LATENT), goes straight into CogVideo Decode.
How to install it
Part of the CogVideoX wrapper - nothing node-specific to install:
- 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
Out of memory during sampling. This is where the VRAM cost lands hardest. Fix it upstream at the loader (fp8 quantization, CPU offload) rather than here, and consider dropping num_frames or resolution. Long clips via context_options also raise peak memory.
It's painfully slow. 50 steps on a video model is a lot. Drop steps, and wire in a cache node - CogVideoX FasterCache or a TeaCache - through the optional inputs. On the attention side, SageAttention (set at the loader) is the other big lever.
Stiff or over-cooked motion. Usually cfg too high. Bring it down toward 6 or below. And remember: with speed tricks like caching, faces and fine motion are the first things to wobble, so if identity drifts, try turning the cache off before blaming the sampler.
I2V ignores the image. You loaded a plain text-to-video model, or forgot to connect image_cond_latents. Image-to-video needs an -I2V model and the encoded latents wired into that optional slot.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COGVIDEOMODEL | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| num_frames | INT | 491–1024 | — |
| steps | INT | 50 | — |
| cfg | FLOAT | 6.000–30 | — |
| seed | INT | 00–18446744073709550000 | — |
| scheduler | COMBO | CogVideoXDDIM | 12 options: DPM++, Euler, Euler A, PNDM, DDIM, CogVideoXDDIM, +6 |
| samplesopt | LATENT | init Latents to use for video2video process | |
| image_cond_latentsopt | LATENT | Latent to use for image2video conditioning | |
| denoise_strengthopt | FLOAT | 1.000–1 | — |
| context_optionsopt | COGCONTEXT | — | |
| controlnetopt | COGVIDECONTROLNET | — | |
| tora_trajectoryopt | TORAFEATURES | — | |
| fastercacheopt | FASTERCACHEARGS | — | |
| feta_argsopt | FETAARGS | — | |
| teacache_argsopt | TEACACHEARGS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| samples | LATENT | — |