THUDM / CogVideoX-2b

huggingface.co
Total runs: 69.6K
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: November 23 2024
text-to-video

Introduction of CogVideoX-2b

Model Details of CogVideoX-2b

CogVideoX-2B

📄 中文阅读 | 🌐 Github(with PDF paper) | 📜 arxiv (coming soon)

Demo Show
Video Gallery with Captions
A detailed wooden toy ship with intricately carved masts and sails is seen gliding smoothly over a plush, blue carpet that mimics the waves of the sea. The ship's hull is painted a rich brown, with tiny windows. The carpet, soft and textured, provides a perfect backdrop, resembling an oceanic expanse. Surrounding the ship are various other toys and children's items, hinting at a playful environment. The scene captures the innocence and imagination of childhood, with the toy ship's journey symbolizing endless adventures in a whimsical, indoor setting.
The camera follows behind a white vintage SUV with a black roof rack as it speeds up a steep dirt road surrounded by pine trees on a steep mountain slope, dust kicks up from it’s tires, the sunlight shines on the SUV as it speeds along the dirt road, casting a warm glow over the scene. The dirt road curves gently into the distance, with no other cars or vehicles in sight. The trees on either side of the road are redwoods, with patches of greenery scattered throughout. The car is seen from the rear following the curve with ease, making it seem as if it is on a rugged drive through the rugged terrain. The dirt road itself is surrounded by steep hills and mountains, with a clear blue sky above with wispy clouds.
A street artist, clad in a worn-out denim jacket and a colorful bandana, stands before a vast concrete wall in the heart, holding a can of spray paint, spray-painting a colorful bird on a mottled wall.
In the haunting backdrop of a war-torn city, where ruins and crumbled walls tell a story of devastation, a poignant close-up frames a young girl. Her face is smudged with ash, a silent testament to the chaos around her. Her eyes glistening with a mix of sorrow and resilience, capturing the raw emotion of a world that has lost its innocence to the ravages of conflict.
Model Introduction

CogVideoX is an open-source video generation model that shares the same origins as 清影 . The table below provides a list of the video generation models we currently offer, along with their basic information.

Model Name CogVideoX-2B
Prompt Language English
Single GPU Inference (FP16) 23.9GB
Multi GPUs Inference (FP16) 20GB minimum per GPU using diffusers
GPU Memory Required for Fine-tuning(bs=1) 40GB
Prompt Max Length 226 Tokens
Video Length 6 seconds
Frames Per Second 8 frames
Resolution 720 * 480
Quantized Inference Not Supported

Note Using SAT model cost 18GB for inference. Check our github.

Quick Start 🤗

This model supports deployment using the huggingface diffusers library. You can deploy it by following these steps.

We recommend that you visit our GitHub and check out the relevant prompt optimizations and conversions to get a better experience.

  1. Install the required dependencies
pip install --upgrade opencv-python transformers diffusers # Must using diffusers>=0.30.0
  1. Run the code
import torch
from diffusers import CogVideoXPipeline
from diffusers.utils import export_to_video

prompt = "A panda, dressed in a small, red jacket and a tiny hat, sits on a wooden stool in a serene bamboo forest. The panda's fluffy paws strum a miniature acoustic guitar, producing soft, melodic tunes. Nearby, a few other pandas gather, watching curiously and some clapping in rhythm. Sunlight filters through the tall bamboo, casting a gentle glow on the scene. The panda's face is expressive, showing concentration and joy as it plays. The background includes a small, flowing stream and vibrant green foliage, enhancing the peaceful and magical atmosphere of this unique musical performance."

pipe = CogVideoXPipeline.from_pretrained(
    "THUDM/CogVideoX-2b",
    torch_dtype=torch.float16
)

pipe.enable_model_cpu_offload()

prompt_embeds, _ = pipe.encode_prompt(
    prompt=prompt,
    do_classifier_free_guidance=True,
    num_videos_per_prompt=1,
    max_sequence_length=226,
    device="cuda",
    dtype=torch.float16,
)

video = pipe(
    num_inference_steps=50,
    guidance_scale=6,
    prompt_embeds=prompt_embeds,
).frames[0]

export_to_video(video, "output.mp4", fps=8)

Using a single A100 GPU, generating a video with the above configuration takes approximately 90 seconds

If the generated model appears “all green” and not viewable in the default MAC player, it is a normal phenomenon (due to OpenCV saving video issues). Simply use a different player to view the video.

Explore the Model

Welcome to our github , where you will find:

  1. More detailed technical details and code explanation.
  2. Optimization and conversion of prompt words.
  3. Reasoning and fine-tuning of SAT version models, and even pre-release.
  4. Project update log dynamics, more interactive opportunities.
  5. CogVideoX toolchain to help you better use the model.
Model License

This model is released under the CogVideoX LICENSE .

Citation

The technical report is still being written, stay tuned.

Runs of THUDM CogVideoX-2b on huggingface.co

69.6K
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About CogVideoX-2b huggingface.co Model

More CogVideoX-2b license Visit here:

https://choosealicense.com/licenses/apache-2.0

CogVideoX-2b huggingface.co

CogVideoX-2b huggingface.co is an AI model on huggingface.co that provides CogVideoX-2b's model effect (), which can be used instantly with this THUDM CogVideoX-2b model. huggingface.co supports a free trial of the CogVideoX-2b model, and also provides paid use of the CogVideoX-2b. Support call CogVideoX-2b model through api, including Node.js, Python, http.

CogVideoX-2b huggingface.co Url

https://huggingface.co/THUDM/CogVideoX-2b

THUDM CogVideoX-2b online free

CogVideoX-2b huggingface.co is an online trial and call api platform, which integrates CogVideoX-2b's modeling effects, including api services, and provides a free online trial of CogVideoX-2b, you can try CogVideoX-2b online for free by clicking the link below.

THUDM CogVideoX-2b online free url in huggingface.co:

https://huggingface.co/THUDM/CogVideoX-2b

CogVideoX-2b install

CogVideoX-2b is an open source model from GitHub that offers a free installation service, and any user can find CogVideoX-2b on GitHub to install. At the same time, huggingface.co provides the effect of CogVideoX-2b install, users can directly use CogVideoX-2b installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

CogVideoX-2b install url in huggingface.co:

https://huggingface.co/THUDM/CogVideoX-2b

Url of CogVideoX-2b

CogVideoX-2b huggingface.co Url

Provider of CogVideoX-2b huggingface.co

THUDM
ORGANIZATIONS

Other API from THUDM

huggingface.co

Total runs: 659.2K
Run Growth: 0
Growth Rate: 0.00%
Updated:December 05 2024
huggingface.co

Total runs: 611.5K
Run Growth: 0
Growth Rate: 0.00%
Updated:August 04 2024
huggingface.co

Total runs: 243.1K
Run Growth: 0
Growth Rate: 0.00%
Updated:March 11 2025
huggingface.co

Total runs: 95.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:March 13 2025
huggingface.co

Total runs: 28.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:March 03 2025
huggingface.co

Total runs: 23.6K
Run Growth: 0
Growth Rate: 0.00%
Updated:November 23 2024
huggingface.co

Total runs: 15.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:April 14 2025
huggingface.co

Total runs: 6.5K
Run Growth: 0
Growth Rate: 0.00%
Updated:December 19 2023
huggingface.co

Total runs: 6.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:October 25 2024
huggingface.co

Total runs: 4.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:April 22 2025
huggingface.co

Total runs: 3.3K
Run Growth: 0
Growth Rate: 0.00%
Updated:January 02 2025
huggingface.co

Total runs: 2.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:August 04 2024
huggingface.co

Total runs: 993
Run Growth: 0
Growth Rate: 0.00%
Updated:October 20 2023
huggingface.co

Total runs: 928
Run Growth: 0
Growth Rate: 0.00%
Updated:October 20 2023
huggingface.co

Total runs: 853
Run Growth: 0
Growth Rate: 0.00%
Updated:January 27 2025
huggingface.co

Total runs: 607
Run Growth: 0
Growth Rate: 0.00%
Updated:January 02 2025
huggingface.co

Total runs: 299
Run Growth: 0
Growth Rate: 0.00%
Updated:March 02 2023
huggingface.co

Total runs: 188
Run Growth: 0
Growth Rate: 0.00%
Updated:August 04 2024
huggingface.co

Total runs: 167
Run Growth: 0
Growth Rate: 0.00%
Updated:October 20 2023
huggingface.co

Total runs: 119
Run Growth: 0
Growth Rate: 0.00%
Updated:December 10 2024
huggingface.co

Total runs: 75
Run Growth: 0
Growth Rate: 0.00%
Updated:November 20 2023
huggingface.co

Total runs: 62
Run Growth: 0
Growth Rate: 0.00%
Updated:July 09 2025
huggingface.co

Total runs: 43
Run Growth: 0
Growth Rate: 0.00%
Updated:July 09 2025
huggingface.co

Total runs: 43
Run Growth: 0
Growth Rate: 0.00%
Updated:July 24 2023
huggingface.co

Total runs: 28
Run Growth: 0
Growth Rate: 0.00%
Updated:July 09 2025
huggingface.co

Total runs: 25
Run Growth: 0
Growth Rate: 0.00%
Updated:March 02 2023
huggingface.co

Total runs: 14
Run Growth: 0
Growth Rate: 0.00%
Updated:July 24 2023
huggingface.co

Total runs: 12
Run Growth: 0
Growth Rate: 0.00%
Updated:July 22 2024