Earngenix Logo
Skip to main content

ComfyUI Tutorial · AI Video Generation · 2026

How to Install CogVideoX in ComfyUI: Text-to-Video & Image-to-Video

Install CogVideoX, load ready-made workflows, fix common errors, and generate your first AI video from text or image — step by step.

By Earngenix Team12 min read
CogVideoX installed in ComfyUI showing the text-to-video generation workflow

Introduction & Prerequisites

What this guide covers: How to install CogVideoX in ComfyUI, download the right model files, fix the most common setup errors, and generate videos from both text prompts and images.

In this guide, you will learn how to install CogVideoX in ComfyUI, which lets you generate videos from text and images locally on your own hardware. Whether you want to create a fun video — like a cat walking on a beach wearing sunglasses — or generate professional AI footage, this tutorial walks you through every step.

Prerequisites

Before starting, you need ComfyUI and ComfyUI Manager installed. If you have not done that yet, use the guides below — then come back here.

⚠️ Note: CogVideoX 5B requires significant VRAM — ideally 24 GB or more (RTX 3090 / RTX 4090). Lower VRAM GPUs may struggle or fail to run the 5B model.

Step 1: Install CogVideoX in ComfyUI

CogVideoX runs through a custom node called ComfyUI Cog Video X-Wrapper. Install it through ComfyUI Manager in four steps:

Open ComfyUI

Make sure ComfyUI is running and open in your browser.

Go to Custom Node Manager

Click the Manager button at the top of ComfyUI, then select "Custom Node Manager" from the panel.

Search for "ComfyUI Cog Video X-Wrapper"

Type the name in the search bar. The node will appear in the results.

Search term to copy:

ComfyUI Cog Video X-Wrapper

Click Install, then restart ComfyUI

When you see "ComfyUI Cog Video X-Wrapper" in the list, click Install. After the installation finishes, restart ComfyUI when prompted.

Step 2: Load the Example Workflow

Download the CogVideoX 5B text-to-video workflow below. Once downloaded, drag the JSON file directly into ComfyUI to load it.

💡 Tip: Drag the downloaded JSON file straight onto the ComfyUI canvas — no need to use the Load button. ComfyUI will import the workflow automatically.

Step 3: Fix Missing Node Errors

🔴 Error: You might see a red error message saying "missing node type" after loading the workflow. This is common and easy to fix.

Open the Manager and click "Install Missing Custom Nodes"

Go to the Manager panel, find the "Install Missing Custom Nodes" option, and click it. ComfyUI Manager will scan your workflow and install any missing nodes automatically.

Restart ComfyUI

After installation completes, restart ComfyUI to apply the changes. The red errors should disappear.

Step 4: Resolve Clip Text Encoder Issues

🔴 Error: If you see "Prompt Output Failed Validation: Clip Loader Requires Input", the T5 text encoder file is missing.

Download the T5 text encoder file

Download the t5xxl_fp8_e4m3fn.safetensors file from Hugging Face using the link below.

Place the file in the clip folder

After downloading, navigate to your ComfyUI/models/clip folder and paste the file there.

ComfyUI > models > clip

Refresh your browser

Press F5 or Ctrl+Shift+R to refresh ComfyUI. The Clip Text Encoder will now load correctly.

Step 5: Fix CogVideo Model Errors

🔴 Error: When you first run the workflow, ComfyUI may try to download the CogVideoX model files from Hugging Face automatically — but this can fail due to file size or network issues.

If the automatic download fails, download the transformer model files manually:

Download the transformer model files

Go to the Hugging Face repository for CogVideoX-5B and download the two transformer shard files (00001 and 00002).

Place the files in the correct folder

After downloading, place both files in the transformer folder inside ComfyUI's CogVideo directory.

ComfyUI > models > CogVideo > CogVideoX-5B > transformer

Refresh and run

Refresh your browser and click Queue Prompt again. The model will now load from your local files.

Step 6: Text-to-Video Example

Now the fun part. Here is a ready-to-use example prompt — a cat walking on a beach wearing sunglasses. Copy it directly into the CogVideoX text encoder and run the workflow.

Example Prompt

A confident cat with short, striped brown fur walks toward the camera on a sunny beach, wearing reflective sunglasses. Paw prints trail behind in the sand as gentle waves roll in the background. The sun casts a warm glow, with a clear sky and a few clouds. The sunglasses reflect the beach and ocean, giving the cat a cool, laid-back vibe.

Paste the prompt into the CogVideoX text encoder

Copy the prompt above and paste it into the text encoder node in your loaded workflow.

Click "Queue Prompt" to generate the video

ComfyUI will process the prompt through CogVideoX. Generation takes several minutes depending on your GPU.

Check the output

Once complete, the video will be saved to your ComfyUI output folder. You can preview it directly in the browser.

Example output: cat walking on a beach wearing sunglasses — generated with CogVideoX 5B in ComfyUI

Step 7: Image-to-Video Example

CogVideoX also supports image-to-video — you provide a starting image and a prompt, and the model animates it. This uses a different model (CogVideoX-5B-I2V) and workflow.

Download and load the I2V workflow

Download the image-to-video workflow below, then drag it into ComfyUI to load it.

Fix any missing nodes

As before, go to Manager → "Install Missing Custom Nodes" if any red errors appear after loading.

Upload your image in the "Load Image" node

In the Load Image node, click "Choose File" and select the image you want to animate.

Enter a motion prompt

In the text encoder, describe the motion you want — for example: "fox walking toward the camera".

Click "Queue Prompt" to generate

If you encounter missing model errors, download the I2V transformer files manually from Hugging Face.

Download files 00001, 00002, and 00003, then place them in:

ComfyUI > models > CogVideo > CogVideoX-5B-I2V > transformer

Refresh and run again

After placing the files, refresh your browser and click Queue Prompt. The video will generate from your uploaded image.

Example image-to-video output: fox walking toward the camera — generated with CogVideoX 5B-I2V

Frequently Asked Questions

CogVideoX is an open-source AI video generation model by THUDM that supports both text-to-video and image-to-video generation. It can be run locally inside ComfyUI using the ComfyUI Cog Video X-Wrapper custom node — no cloud subscription required.

Open ComfyUI Manager, go to Custom Node Manager, search for "ComfyUI Cog Video X-Wrapper", click Install, then restart ComfyUI. After that, load the example workflow, fix any missing nodes, and download the required model files from Hugging Face.

This happens because the T5 text encoder file is missing. Download t5xxl_fp8_e4m3fn.safetensors from Hugging Face (comfyanonymous/flux_text_encoders) and place it in the ComfyUI/models/clip folder, then refresh your browser.

For the text-to-video model (5B), place the transformer shard files in ComfyUI/models/CogVideo/CogVideoX-5B/transformer. For image-to-video (5B-I2V), use ComfyUI/models/CogVideo/CogVideoX-5B-I2V/transformer.

It depends on your GPU. On an RTX 3090 or RTX 4090, a short 6-second clip at 49 frames typically takes 5–20 minutes. Lower VRAM GPUs will take longer or may not run the 5B model. Using lower frame counts and resolutions will also reduce generation time.

Final Thoughts

Now that CogVideoX is up and running in ComfyUI, you are ready to experiment with both text-to-video and image-to-video generation. The setup takes a little patience — especially getting the model files in the right folders — but once it works, the results are impressive.

Try different prompts, adjust frame counts, and explore the image-to-video workflow with your own images. If you run into any issues not covered here, the troubleshooting guide below covers a wide range of ComfyUI errors.

Having trouble? Check the ComfyUI Troubleshooting Guide for fixes to the most common node errors, model loading issues, and GPU memory problems.
Discussion

Join the discussion

Sign in to leave a comment or reply

💬

No comments yet

Be the first to share your thoughts!