MCPcopy Index your code
hub / github.com/MinusZoneAI/ComfyUI-CogVideoX-MZ

github.com/MinusZoneAI/ComfyUI-CogVideoX-MZ @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
333 symbols 904 edges 26 files 86 documented · 26%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

image

ComfyUI-CogVideoX-MZ

在 https://github.com/kijai/ComfyUI-CogVideoXWrapper 的基础上增加一个独立的模型加载器和一些其他的功能, 使用前需要先安装ComfyUI-CogVideoXWrapper

Based on https://github.com/kijai/ComfyUI-CogVideoXWrapper add model loader and some other features, you need to install ComfyUI-CogVideoXWrapper before using

Update - 2024-09-24

添加vae encode tiling开关, 在16G显存下可以生成1024分辨率的视频不会OOM

(add vae encode tiling switch, can generate 1024 resolution video without OOM on 16G vram)

Update - 2024-09-22

支持CogVideoX-I2V图生视频, 提供Q4量化模型

(support CogVideoX-I2V image to video, provide Q4 quantization model)

CogVideoX_5b_I2V_GGUF_Q4_0.safetensors 下载到unet文件夹 (Donwload to unet folder)

工作流在examples\workflow_I2V_GGUF_Q4_0.png (Workflow in examples\workflow_I2V_GGUF_Q4_0.png)

Prompt :The girl in the video happily puts on sunglasses.

https://github.com/user-attachments/assets/3eae12b7-1a2d-40c5-b6fb-10afb1349f4e

Update - 2024-09-19

支持CogVideoX-Fun图生视频, 提供Q4量化模型

(support CogVideoX-Fun image to video, provide Q4 quantization model)

CogVideoX_Fun_GGUF_Q4_0.safetensors 下载到unet文件夹 (Donwload to unet folder)

工作流在examples\workflow_FUN_I2V_GGUF_Q4_0.png (Workflow in examples\workflow_FUN_I2V_GGUF_Q4_0.png)

Prompt :The girl in the video happily puts on sunglasses.

https://github.com/user-attachments/assets/32101df0-d50c-404a-a2ea-3ddff0dcc59b

Update - 2024-09-05

部分层4位量化模型, 采样方式选择DPM, weight_dtype选择GGUF, cpu_offload不启用分辨率480x720在32帧下占用显存小于8G

(CogVideoX-5B 4-bit quantization model, when using it, the sampling method needs to select DPM, weight_dtype selects GGUF, and cpu_offload is not enabled)

CogVideoX_5b_GGUF_Q4_0.safetensors 下载到unet文件夹

4位量化工作流在examples\workflow_GGUF_Q4_0.png

使用

CogVideoX-5B的模型加载器

依赖 https://github.com/kijai/ComfyUI-CogVideoXWrapper

模型下载地址

CogVideoX_5b_fp8_4em.safetensors 下载到unet文件夹

diffusion_pytorch_model.safetensors 下载到vae文件夹(记得重命名文件名方便辨认)

t5xxl_fp8_e4m3fn.safetensors 下载到clip文件夹(和sd3/flux通用,不需要重复下载)

工作流在examples/*.png

Usage

CogVideoX-5B model loader

Depends on https://github.com/kijai/ComfyUI-CogVideoXWrapper

Model download address

CogVideoX_5b_fp8_4em.safetensors Download to unet folder

diffusion_pytorch_model.safetensors Download to vae folder (remember to rename the file name for easy identification)

t5xxl_fp8_e4m3fn.safetensors Download to clip folder (universal with sd3/flux, no need to download repeatedly)

Workflow in examples/*.png

Credits

Core symbols most depended-on inside this repo

apply_rotary_emb
called by 16
videosys/modules/embeddings.py
enable_pab
called by 11
videosys/core/pab_mgr.py
encode
called by 6
cogvideox_fun/autoencoder_magvit.py
load
called by 5
__init__.py
_prepare_rotary_positional_embeddings
called by 4
pipeline_cogvideox.py
ordered_halving
called by 4
cogvideox_fun/context.py
set_attn_processor
called by 4
cogvideox_fun/transformer_3d.py
_clear_fake_context_parallel_cache
called by 4
cogvideox_fun/autoencoder_magvit.py

Shape

Method 208
Function 75
Class 50

Languages

Python100%

Modules by API surface

cogvideox_fun/autoencoder_magvit.py53 symbols
cogvideox_fun/transformer_3d.py24 symbols
videosys/core/pab_mgr.py22 symbols
cogvideox_fun/lora_utils.py22 symbols
cogvideox_fun/pipeline_cogvideox_inpaint.py21 symbols
cogvideox_fun/fun_pab_transformer_3d.py21 symbols
custom_cogvideox_transformer_3d.py20 symbols
cogvideox_fun/pipeline_cogvideox_control.py19 symbols
videosys/modules/embeddings.py17 symbols
pipeline_cogvideox.py16 symbols
videosys/cogvideox_transformer_3d.py15 symbols
mz_gguf_loader.py15 symbols

For agents

$ claude mcp add ComfyUI-CogVideoX-MZ \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact