How to run CogVideoX on a cloud GPU

Rent a GPU on Deploy, then open a terminal in JupyterLab or over SSH. Install CogVideoX from the official zai-org/CogVideo repository, let the documented script download the weights, and run text-to-video or image-to-video. Copy the MP4 off the instance before you destroy it. Destroying the instance deletes its disk.

https://github.com/THUDM/CogVideo returned HTTP 301 to https://github.com/zai-org/CogVideo on 2026-11-12. The commands below use the zai-org URL.

The README’s Model-License section says the code in the repository is released under the Apache 2.0 License, and that the CogVideoX-2B model, including its Transformers module and VAE module, is released under the Apache 2.0 License. The same section says the CogVideoX-5B model (Transformers module, including I2V and T2V) is released under the CogVideoX LICENSE. That file is titled “The CogVideoX License” (read 2026-11-12). It says academic research is allowed, and that commercial use requires registering for a basic commercial license at the URL printed in the file. It also says: “Users who have registered and obtained the basic commercial license can use the models for commercial activities for free, but must comply with all terms and conditions of this license. Additionally, the number of service users (visits) for your commercial activities must not exceed 1 million visits per month.” Those sentences are the license. They are not a CloudGPU price and they are not a statement about storage. The same file names a governing law and a court. Read those sentences in the file. The Model-License section does not add a separate sentence for CogVideoX1.5. Read the 1.5 model card before you use those weights.

Other video models on this site: How to run Wan 2.2 video generation on a cloud GPU, How to run HunyuanVideo on a cloud GPU, How to run LTX-Video on a cloud GPU, and How to run FramePack on a cloud GPU.

The commands below are copied from the upstream files named in each step. They were not run on a CloudGPU instance for this page. Anything this page adds around them is marked.

Memory the README publishes

The CogVideo README single-GPU memory row (read 2026-11-12) is:

Model columns Single GPU memory usage, as printed
CogVideoX1.5-5B and CogVideoX1.5-5B-I2V SAT BF16: 76GB. diffusers BF16: from 10GB*. diffusers INT8 (torchao): from 7GB*.
CogVideoX-2B SAT FP16: 18GB. diffusers FP16: 4GB minimum*. diffusers INT8 (torchao): 3.6GB minimum*.
CogVideoX-5B and CogVideoX-5B-I2V SAT BF16: 26GB. diffusers BF16: 5GB minimum*. diffusers INT8 (torchao): 4.4GB minimum*.

The multi-GPU row on the same table prints BF16 24GB using diffusers for the 1.5 columns, FP16 10GB using diffusers for CogVideoX-2B, and BF16 15GB using diffusers for the 5B columns. This page does not treat a single catalog GPU as that multi-GPU row.

The README’s data note says that while testing with the diffusers library, all optimizations included in the diffusers library were enabled. It says this scheme has not been tested for actual memory usage on devices outside two architectures it names. This page repeats one of those names only as the catalog rows A100 40G and A100 80G, and it does not repeat the other name. The same note says the scheme can generally be adapted to all NVIDIA Ampere architecture and above devices. This page does not label catalog rows as Ampere or not. It says that if optimizations are disabled, peak memory usage is about 3 times the value in the table. This page does not multiply the table into a second cutoff. The optimizations it names are:

pipe.enable_sequential_cpu_offload()
pipe.vae.enable_slicing()
pipe.vae.enable_tiling()

The table also has an inference-speed row. This page does not copy it. A news line says CogVideoX-2B can run on older GPUs like GTX 1080TI and CogVideoX-5B on desktop GPUs like RTX 3060. Those two strings are not names in gpu-prices.json. This page does not assign them a vram_gb.

GET /v1/public/compute-capabilities does not list GPUs. It returns feature flags. The memory column is vram_gb from gpu-prices.json, updated_at 2026-11-12T19:13:48.059Z. GET /v1/public/gpu-catalog the same day (generated_at 2026-11-12T19:13:49.196Z) listed the same names and the same vram_gb values, plus Ascend 910B at 64, which is not in gpu-prices.json and is not listed here. The catalog response also includes an availability field. This page does not copy it. The comparisons below are numeric. They are not a measurement of a generation on that card. Which listing you can start is on Deploy. This page does not say which listings are available.

Catalog name vram_gb
RTX 2080 8
RTX 3080 10
RTX 2080 Ti 11
RTX 3080 Ti 12
V100 16G 16
A30 24
RTX 3090 24
RTX 4090 24
RTX 4090D 24
RTX 4080 SUPER 32G 32
RTX 5090 32
RTX 5090D 32
V100 32G 32
A100 40G 40
A800 40G 40
A40 48
RTX 4090 48G 48
RTX 4090D 48G 48
RTX A6000 48
NVIDIA RTX PRO 5000 72G 72
RTX PRO 5000 72G 72
A100 80G 80
A800 80G 80
H800 80
RTX 6000D 83
H20 96G 96
RTX PRO 6000 96G 96
RTX PRO 6000 Max-Q 96
H20-3e 141G 141

Against the README’s single-GPU numbers, still with the asterisk note above:

  • 76GB SAT for the 1.5 columns: vram_gb of 80 or more meets 76. That is A100 80G, A800 80G, H800, RTX 6000D, H20 96G, RTX PRO 6000 96G, RTX PRO 6000 Max-Q, and H20-3e 141G. NVIDIA RTX PRO 5000 72G and RTX PRO 5000 72G are 72, which is below 76.
  • 26GB SAT for CogVideoX-5B and CogVideoX-5B-I2V: vram_gb of 32 or more meets 26. The 24 GB rows do not. Those rows are A30, RTX 3090, RTX 4090, and RTX 4090D.
  • 18GB SAT for CogVideoX-2B: vram_gb of 24 or more meets 18. RTX 2080 (8), RTX 3080 (10), RTX 2080 Ti (11), RTX 3080 Ti (12), and V100 16G (16) do not.
  • “from 10GB” diffusers BF16 for the 1.5 columns: every row except RTX 2080 (8) is 10 or more.
  • “from 7GB”, “5GB minimum”, “4.4GB minimum”, “4GB minimum”, and “3.6GB minimum”: every row is 8 or more, so every row is at or above each of those printed numbers.

Memory the diffusers docs publish

The diffusers CogVideoX page (read 2026-11-12) is a different document. This page does not merge its numbers into the README table.

It says: “The quantized CogVideoX 5B model below requires ~16GB of VRAM.” The example under that sentence uses int8 quantization, fp8 layerwise casting, and enable_model_cpu_offload(). This page does not split the ~16GB sentence across those three calls. Rows with vram_gb of 16 or more are at or above 16. RTX 2080 (8), RTX 3080 (10), RTX 2080 Ti (11), and RTX 3080 Ti (12) are below 16. V100 16G is 16. The tilde is the page’s.

The same page’s memory table:

method memory usage (enabled) memory usage (disabled)
enable_model_cpu_offload 19GB 33GB
enable_sequential_cpu_offload <4GB ~33GB (very slow inference speed)
enable_tiling 11GB (with enable_model_cpu_offload) —

Numeric comparison with vram_gb, without treating the tilde or the less-than sign as a measurement this page made:

  • 19GB: rows of 24 or more are at or above 19. Rows of 16 or less are below 19.
  • 33GB and ~33GB: rows of 40 or more are at or above 33. Rows of 32 or less are below 33.
  • <4GB: every catalog vram_gb is greater than 4.
  • 11GB: RTX 2080 (8) and RTX 3080 (10) are below 11. RTX 2080 Ti is 11.

The same page prints an average inference time on an 80GB A100. This page does not repeat that timing. A source link on the page points at the diffusers tree v0.43.0 for pipeline_cogvideox.py. This page did not check that the prose above that link is frozen to that tag.

The page’s notes also say the text-to-video checkpoints work best at 1360x768, and that for image-to-video “the height must be 758” while the width can vary from 768 to 1360, with both divisible by 16. The README’s resolution row says 1360 * 768 for CogVideoX1.5-5B and 720 * 480 for CogVideoX-2B, CogVideoX-5B, and CogVideoX-5B-I2V. This page does not decide which sentence applies to which checkpoint.

Install on Linux

On Deploy, choose Raw GPU. The README’s diffusers section says Python must be between 3.10 and 3.12, inclusive, and then prints:

pip install -r requirements.txt

That file is inside the repository. The README does not print a clone. The clone and the cd below are added so the requirements file is the one in zai-org/CogVideo. They were not run:

git clone https://github.com/zai-org/CogVideo.git
cd CogVideo
pip install -r requirements.txt

requirements.txt (read 2026-11-12) includes diffusers>=0.35.2, torch>=2.8.0, torchvision>=0.23.0, and gradio>=5.49.1. It also names other packages. One of those names is not reprinted here. cloudgpu-net is not in the README. The download speed guide says to leave it off during pip. How to install a specific PyTorch CUDA version is the index check against nvidia-smi. The requirements file does not pin a CUDA wheel index.

Text-to-video and image-to-video

The README points at inference/cli_demo.py. The shell line that file prints, including the leading $, is:

$ python cli_demo.py --prompt "A girl riding a bike." --model_path THUDM/CogVideoX1.5-5b --generate_type "t2v"

Run it from inference/ after the install, or pass a path to the script. The cd inference is not in the file. The argparse default for --model_path is THUDM/CogVideoX1.5-5B, with a capital B. The printed example uses THUDM/CogVideoX1.5-5b, with a lowercase b. The README table links https://huggingface.co/THUDM/CogVideoX1.5-5B. This page did not check which of those ids the Hub accepts.

The file’s header says text-to-video ids are THUDM/CogVideoX-5b, THUDM/CogVideoX-2b, or THUDM/CogVideoX1.5-5b, and image-to-video ids are THUDM/CogVideoX-5b-I2V or THUDM/CogVideoX1.5-5b-I2V. It does not print a second shell line for image-to-video. The line below is assembled from that header and from --image_or_video_path. The image path is a placeholder this page added. The line was not run:

python cli_demo.py --prompt "A girl riding a bike." --model_path THUDM/CogVideoX-5b-I2V --generate_type "i2v" --image_or_video_path /path/to/image.png

--output_path defaults to ./output.mp4. --num_inference_steps defaults to 50, --num_frames to 81, --fps to 16, --guidance_scale to 6.0, --dtype to bfloat16, and --seed to 42. The script calls pipe.enable_sequential_cpu_offload(), pipe.vae.enable_slicing(), and pipe.vae.enable_tiling(). A comment above that call names a GPU this page does not repeat. The file’s header says you can change pipe.enable_sequential_cpu_offload() to pipe.enable_model_cpu_offload() and that this uses more GPU memory. It does not say how much more.

The diffusers page’s text-to-video example comment lists THUDM/CogVideoX-2b or THUDM/CogVideoX-5b, and the call it prints is CogVideoXPipeline.from_pretrained("THUDM/CogVideoX-2b", torch_dtype=torch.float16). Its image-to-video example prints CogVideoXImageToVideoPipeline.from_pretrained("THUDM/CogVideoX-5b-I2V", torch_dtype=torch.bfloat16). Both examples call export_to_video(..., "output.mp4", fps=8). The prompts and the image URL are on that page. This page does not reprint them. Weights download when from_pretrained runs. The Hugging Face download guide is a separate hf download path. This page did not check it against these ids.

The README says the model is trained with long prompts and points at inference/convert_demo.py. The project-structure section says that script defaults to GLM-4 and that it can be replaced. This page does not repeat the other product names in that sentence.

Gradio demo

inference/gradio_composite_demo/README.md says to install that directory’s requirements.txt and run:

python app.py

The cd into inference/gradio_composite_demo is not in that README. It is added here so app.py is the file in that directory. app.py calls demo.queue(max_size=15) and then demo.launch() with no port argument. The README frontmatter sets app_port: 7860. That frontmatter is the Space config. This page did not run the app and does not state that demo.launch() binds 7860. Forward the port the process prints, using how to use SSH port forwarding on a cloud GPU. If the log prints 7860, that is the same number as the frontmatter, not a measurement this page made.

The README’s environment section names two variables and tells you to set them before python app.py. Copy those lines from that README. This page does not paste them. convert_prompt in app.py returns the original prompt when the key variable is unset. The file’s header comment also names a script path, inference/gradio_web_demo.py, which is not app.py, and a URL this page does not paste.

app.py starts a thread at import that deletes files in ./output and ./gradio_tmp when the modification time is older than timedelta(minutes=10), then sleeps time.sleep(600). Copy an MP4 out of ./output before that thread removes it. That cutoff is in app.py. It is not a statement about how long an instance takes to start.

The CLI default ./output.mp4 is a different path from the Gradio ./output directory.

ComfyUI

The README’s friendly links include ComfyUI-CogVideoXWrapper. That repository is not ComfyUI examples. The examples top-level directory list on 2026-11-12 had no CogVideoX directory. The examples video directory documents a different image-to-video checkpoint and does not name CogVideoX. This page does not add a ComfyUI workflow. How to choose a rental GPU for ComfyUI is the card page for that template.

When it fails

CUDA out of memory. Compare the error with the README row and the diffusers table above before changing flags. The script already calls enable_sequential_cpu_offload. Then use how to fix CUDA out of memory on a cloud GPU.

“CUDA error: no kernel image is available for execution on the device” on an RTX 5090. requirements.txt sets torch>=2.8.0 and does not pin a CUDA index. The RTX 5090 guide says that card is compute capability 12.0 (sm_120) and needs a PyTorch build for CUDA 12.8 or newer. This page did not run the requirements file on an RTX 5090. Catalog RTX 5090 and RTX 5090D are 32. Compare 32 with the tables above. That comparison is the memory number only.

Save the video, then destroy

The CLI writes --output_path, which defaults to ./output.mp4. The Gradio app writes under ./output and can delete files there. Copy the MP4 off the instance before you destroy it, and before the Gradio thread’s cutoff if you used app.py. Save your work before you destroy a cloud GPU is the checklist. The terms say data on local instance storage is permanently deleted when the instance is destroyed.

The pricing page states the billing rule in these words:

Per minute, rounded up, with a 1-minute minimum. One hour is pre-authorised while an instance runs, and unused minutes go back to your balance when you destroy the instance. There is no subscription and no minimum term.

Prices are not copied here.

Frequently asked questions

How much GPU memory do the CogVideoX README and the diffusers docs publish?

The CogVideo README, read 2026-11-12, prints single-GPU figures of SAT BF16 76GB and diffusers BF16 from 10GB for CogVideoX1.5-5B and CogVideoX1.5-5B-I2V, SAT FP16 18GB and diffusers FP16 4GB minimum for CogVideoX-2B, and SAT BF16 26GB and diffusers BF16 5GB minimum for CogVideoX-5B and CogVideoX-5B-I2V. The diffusers CogVideoX page, read the same day, says the quantized CogVideoX 5B example requires ~16GB of VRAM, and its table lists enable_model_cpu_offload at 19GB enabled and 33GB disabled, enable_sequential_cpu_offload at <4GB enabled and ~33GB disabled, and enable_tiling at 11GB with enable_model_cpu_offload. This page does not merge those two documents into one cutoff. Compare the printed numbers with vram_gb in https://cloudgpu.app/gpu-prices.json (updated_at 2026-11-12T19:13:48.059Z). Which listing you can start is on https://cloudgpu.app/deploy.

Which license covers CogVideoX-2B and CogVideoX-5B?

The README Model-License section says the repository code and the CogVideoX-2B model, including its Transformers module and VAE module, are under the Apache 2.0 License. It says the CogVideoX-5B Transformers module, including I2V and T2V, is under the CogVideoX License. That file says academic research is allowed, commercial use requires the registration URL printed in the file, and the number of service users for commercial activities must not exceed 1 million visits per month. Those sentences are the license, not a CloudGPU price and not a storage allowance. The Model-License section does not add a separate sentence for CogVideoX1.5.

Does the CogVideo repository ship a Gradio demo?

Yes. inference/gradio_composite_demo/README.md says to run python app.py. app.py calls demo.launch() with no port argument. The README frontmatter sets app_port to 7860 for the Space. This page did not run the app. Forward the port the process prints. The ComfyUI examples top-level directory list on 2026-11-12 had no CogVideoX directory. The README links a separate wrapper repository. This page does not add a ComfyUI workflow.

Where is the video saved, and does the Gradio demo keep it?

The CLI --output_path defaults to ./output.mp4. The Gradio app writes under ./output. app.py starts a thread that deletes files in ./output and ./gradio_tmp when the modification time is older than timedelta(minutes=10). Copy the MP4 off the instance before you destroy it, and before that thread removes it if you used app.py. The terms say data on local instance storage is permanently deleted when the instance is destroyed.

Sources (read 2026-11-12, Asia/Shanghai)


Cards you can start are on the Deploy page. Prices are on https://cloudgpu.app/pricing and are not repeated here.

Last updated: 2026-11-12 (Asia/Shanghai).