Introduction & Prerequisites
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.
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-WrapperClick 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.
Step 3: Fix Missing Node Errors
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
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 > clipRefresh 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
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 > transformerRefresh 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.
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 > transformerRefresh and run again
After placing the files, refresh your browser and click Queue Prompt. The video will generate from your uploaded image.
Frequently Asked Questions
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.
Join the discussion
Sign in to leave a comment or reply
No comments yet
Be the first to share your thoughts!

