Skip to content

Latest commit

ย 

History

187 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

VideoX-Fun

๐Ÿ˜Š Welcome!

CogVideoX-Fun: Hugging Face Spaces

Wan-Fun: Hugging Face Spaces

English | ็ฎ€ไฝ“ไธญๆ–‡ | ๆ—ฅๆœฌ่ชž

Table of Contents

I. Introduction

VideoX-Fun is a video generation pipeline that can be used to generate AI images and videos, as well as to train baseline and Lora models for Diffusion Transformer. We support direct prediction from pre-trained baseline models to generate videos with different resolutions, durations, and FPS. Additionally, we also support users in training their own baseline and Lora models to perform specific style transformations.

II. Quick Start and Usage

1. Environment Preparation

1.1 Cloud Usage: AliyunDSW

DSW has free GPU time, which can be applied once by a user and is valid for 3 months after applying.

Aliyun provide free GPU time in Freetier, get it and use in Aliyun PAI-DSW to start CogVideoX-Fun within 5min!

DSW Notebook

1.2 Local Dependency Installation

We have verified this repo execution on the following environment:

The detailed of Windows:

  • OS: Windows 10
  • python: python3.10 & python3.11
  • pytorch: torch2.2.0
  • CUDA: 11.8 & 12.1
  • CUDNN: 8+
  • GPU๏ผš Nvidia-3060 12G & Nvidia-3090 24G

The detailed of Linux:

  • OS: Ubuntu 20.04, CentOS
  • python: python3.10 & python3.11
  • pytorch: torch2.2.0
  • CUDA: 11.8 & 12.1
  • CUDNN: 8+
  • GPU๏ผšNvidia-V100 16G & Nvidia-A10 24G & Nvidia-A100 40G & Nvidia-A100 80G

We need about 60GB available on disk (for saving weights), please check!

1.3 Using Docker

If you are using docker, please make sure that the graphics card driver and CUDA environment have been installed correctly in your machine.

Then execute the following commands in this way:

# pull image
docker pull mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easycv/torch_cuda:cogvideox_fun

# enter image
docker run -it -p 7860:7860 --network host --gpus all --security-opt seccomp:unconfined --shm-size 200g mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easycv/torch_cuda:cogvideox_fun

# clone code
git clone https://github.com/aigc-apps/VideoX-Fun.git

# enter VideoX-Fun's dir
cd VideoX-Fun

# download weights
mkdir models/Diffusion_Transformer
mkdir models/Personalized_Model

# Please use the hugginface link or modelscope link to download the model.
# CogVideoX-Fun
# https://huggingface.co/alibaba-pai/CogVideoX-Fun-V1.1-5b-InP
# https://modelscope.cn/models/PAI/CogVideoX-Fun-V1.1-5b-InP

# Wan
# https://huggingface.co/alibaba-pai/Wan2.1-Fun-V1.1-14B-InP
# https://modelscope.cn/models/PAI/Wan2.1-Fun-V1.1-14B-InP

1.4 Weight Placement

We'd better place the weights along the specified path:

Via ComfyUI: Put the models into the ComfyUI weights folder ComfyUI/models/Fun_Models/:

๐Ÿ“ฆ ComfyUI/
โ”œโ”€โ”€ ๐Ÿ“‚ models/
โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ Fun_Models/
โ”‚       โ”œโ”€โ”€ ๐Ÿ“‚ CogVideoX-Fun-V1.1-2b-InP/
โ”‚       โ”œโ”€โ”€ ๐Ÿ“‚ CogVideoX-Fun-V1.1-5b-InP/
โ”‚       โ”œโ”€โ”€ ๐Ÿ“‚ Wan2.1-Fun-14B-InP
โ”‚       โ””โ”€โ”€ ๐Ÿ“‚ Wan2.1-Fun-1.3B-InP/

Run its own python file or UI interface:

๐Ÿ“ฆ models/
โ”œโ”€โ”€ ๐Ÿ“‚ Diffusion_Transformer/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ CogVideoX-Fun-V1.1-2b-InP/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ CogVideoX-Fun-V1.1-5b-InP/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ Wan2.1-Fun-14B-InP
โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ Wan2.1-Fun-1.3B-InP/
โ”œโ”€โ”€ ๐Ÿ“‚ Personalized_Model/
โ”‚   โ””โ”€โ”€ your trained trainformer model / your trained lora model (for UI load)

2. Inference Generation

Video and image models share the exact same inference entry, provided by scripts or UI under examples/{model_name}/.

2.1 Entry Selection

Entry Suitable Scenario Config Granularity
Python file Batch generation, parameter debugging Full parameters
WebUI Interactive experience Common parameters only
ComfyUI Existing ComfyUI workflow Node parameters

Table: inference entry selection

2.2 GPU Memory Saving Options

Since Wan2.1 has a very large number of parameters, we need to consider memory optimization strategies to adapt to consumer-grade GPUs. We provide GPU_memory_mode for each prediction file, allowing you to choose between model_cpu_offload, model_cpu_offload_and_qfloat8, and sequential_cpu_offload. This solution is also applicable to CogVideoX-Fun generation.

  • model_cpu_offload: The entire model is moved to the CPU after use, saving some GPU memory.
  • model_cpu_offload_and_qfloat8: The entire model is moved to the CPU after use, and the transformer model is quantized to float8, saving more GPU memory.
  • sequential_cpu_offload: Each layer of the model is moved to the CPU after use. It is slower but saves a significant amount of GPU memory.

qfloat8 may slightly reduce model performance but saves more GPU memory. If you have sufficient GPU memory, it is recommended to use model_cpu_offload.

2.3 Via Python Files

i. Single-GPU Inference:
  • Step 1: Download the corresponding weights and place them in the models folder.
  • Step 2: Use different files for prediction based on the weights and prediction goals. This library currently supports CogVideoX-Fun, Wan2.1, and Wan2.1-Fun. Different models are distinguished by folder names under the examples folder, and their supported features vary. Use them accordingly. Below is an example using CogVideoX-Fun:
    • Text-to-Video:
      • Modify prompt, neg_prompt, guidance_scale, and seed in the file examples/cogvideox_fun/predict_t2v.py.
      • Run the file examples/cogvideox_fun/predict_t2v.py and wait for the results. The generated videos will be saved in the folder samples/cogvideox-fun-videos.
    • Image-to-Video:
      • Modify validation_image_start, validation_image_end, prompt, neg_prompt, guidance_scale, and seed in the file examples/cogvideox_fun/predict_i2v.py.
      • validation_image_start is the starting image of the video, and validation_image_end is the ending image of the video.
      • Run the file examples/cogvideox_fun/predict_i2v.py and wait for the results. The generated videos will be saved in the folder samples/cogvideox-fun-videos_i2v.
    • Video-to-Video:
      • Modify validation_video, validation_image_end, prompt, neg_prompt, guidance_scale, and seed in the file examples/cogvideox_fun/predict_v2v.py.
      • validation_video is the reference video for video-to-video generation. You can use the following demo video: Demo Video.
      • Run the file examples/cogvideox_fun/predict_v2v.py and wait for the results. The generated videos will be saved in the folder samples/cogvideox-fun-videos_v2v.
    • Controlled Video Generation (Canny, Pose, Depth, etc.):
      • Modify control_video, validation_image_end, prompt, neg_prompt, guidance_scale, and seed in the file examples/cogvideox_fun/predict_v2v_control.py.
      • control_video is the control video extracted using operators such as Canny, Pose, or Depth. You can use the following demo video: Demo Video.
      • Run the file examples/cogvideox_fun/predict_v2v_control.py and wait for the results. The generated videos will be saved in the folder samples/cogvideox-fun-videos_v2v_control.
  • Step 3: If you want to integrate other backbones or Loras trained by yourself, modify lora_path and relevant paths in examples/{model_name}/predict_t2v.py or examples/{model_name}/predict_i2v.py as needed.
ii. Multi-GPU Inference:

When using multi-GPU inference, please make sure to install the xfuser. We recommend installing xfuser==0.4.2 and yunchang==0.6.2.

pip install xfuser==0.4.2 --progress-bar off -i https://mirrors.aliyun.com/pypi/simple/
pip install yunchang==0.6.2 --progress-bar off -i https://mirrors.aliyun.com/pypi/simple/

Please ensure that the product of ulysses_degree and ring_degree equals the number of GPUs being used. For example, if you are using 8 GPUs, you can set ulysses_degree=2 and ring_degree=4, or alternatively ulysses_degree=4 and ring_degree=2.

  • ulysses_degree performs parallelization after splitting across the heads.
  • ring_degree performs parallelization after splitting across the sequence.

Compared to ulysses_degree, ring_degree incurs higher communication costs. Therefore, when setting these parameters, you should take into account both the sequence length and the number of heads in the model.

Letโ€™s take 8-GPU parallel inference as an example:

  • For Wan2.1-Fun-V1.1-14B-InP, which has 40 heads, ulysses_degree should be set to a divisor of 40 (e.g., 2, 4, 8, etc.). Thus, when using 8 GPUs for parallel inference, you can set ulysses_degree=8 and ring_degree=1.

  • For Wan2.1-Fun-V1.1-1.3B-InP, which has 12 heads, ulysses_degree should be set to a divisor of 12 (e.g., 2, 4, etc.). Thus, when using 8 GPUs for parallel inference, you can set ulysses_degree=4 and ring_degree=2.

After setting the parameters, run the following command for parallel inference:

torchrun --nproc-per-node=8 examples/wan2.1_fun/predict_t2v.py

2.4 Via the Web UI

The web UI supports text-to-video, image-to-video, video-to-video, and controlled video generation (Canny, Pose, Depth, etc.). This library currently supports CogVideoX-Fun, Wan2.1, and Wan2.1-Fun. Different models are distinguished by folder names under the examples folder, and their supported features vary. Use them accordingly. Below is an example using CogVideoX-Fun:

  • Step 1: Download the corresponding weights and place them in the models folder.
  • Step 2: Run the file examples/cogvideox_fun/app.py to access the Gradio interface.
  • Step 3: Select the generation model on the page, fill in prompt, neg_prompt, guidance_scale, and seed, click "Generate," and wait for the results. The generated videos will be saved in the sample folder.

2.5 Via ComfyUI

For details, refer to ComfyUI README.

3. Model Training

A complete model training pipeline consists of data preprocessing and Video DiT training.

3.1 Data Preprocessing

Training documents for each model are unified under scripts/{model_name}/. For details, see 3.3 Training Documents per Model.

A complete data preprocessing link for long video segmentation, cleaning, and description can refer to README in the video captions section.

If you want to train a text to image and video generation model. You need to arrange the dataset in this format.

๐Ÿ“ฆ project/
โ”œโ”€โ”€ ๐Ÿ“‚ datasets/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ internal_datasets/
โ”‚       โ”œโ”€โ”€ ๐Ÿ“‚ train/
โ”‚       โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ 00000001.mp4
โ”‚       โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ 00000002.jpg
โ”‚       โ”‚   โ””โ”€โ”€ ๐Ÿ“„ .....
โ”‚       โ””โ”€โ”€ ๐Ÿ“„ json_of_internal_datasets.json

The json_of_internal_datasets.json is a standard JSON file. The file_path in the json can to be set as relative path, as shown in below:

[
    {
      "file_path": "train/00000001.mp4",
      "text": "A group of young men in suits and sunglasses are walking down a city street.",
      "type": "video"
    },
    {
      "file_path": "train/00000002.jpg",
      "text": "A group of young men in suits and sunglasses are walking down a city street.",
      "type": "image"
    },
    .....
]

You can also set the path as absolute path as follow:

[
    {
      "file_path": "/mnt/data/videos/00000001.mp4",
      "text": "A group of young men in suits and sunglasses are walking down a city street.",
      "type": "video"
    },
    {
      "file_path": "/mnt/data/train/00000001.jpg",
      "text": "A group of young men in suits and sunglasses are walking down a city street.",
      "type": "image"
    },
    .....
]

3.2 Video DiT Training

The training scripts and launch sh files for each model are located under scripts/{model_name}/. The sh file names vary by task, such as train.sh, train_lora.sh, train_control.sh, train_control_distill.sh, etc.; refer to the actual files in the directory.

If the data format is relative path during data preprocessing, please set scripts/{model_name}/train.sh as follow.

export DATASET_NAME="datasets/internal_datasets/"
export DATASET_META_NAME="datasets/internal_datasets/json_of_internal_datasets.json"

If the data format is absolute path during data preprocessing, please set scripts/{model_name}/train.sh as follow (DATASET_NAME is left empty so the dataset directory prefix is no longer concatenated).

export DATASET_NAME=""
export DATASET_META_NAME="/mnt/data/json_of_internal_datasets.json"

Finally, run the corresponding script.

sh scripts/{model_name}/train.sh

3.3 Training Documents per Model

For parameter details, training documents for each model are unified under scripts/{model_name}/.

Model Baseline Training LoRA Training Others
Wan2.1-Fun EN / ZH EN / ZH Control ENใ€Reward LoRA
Wan2.2 EN / ZH EN / ZH Distill ENใ€S2Vใ€Animate
Wan2.2-Fun EN / ZH EN / ZH Control LoRA EN
CogVideoX-Fun EN / ZH EN / ZH Control ENใ€Reward LoRA
Qwen-Image EN / ZH EN / ZH Edit EN
Qwen-Image-2.1 EN / ZH - Control EN / ZH
Z-Image EN / ZH EN / ZH GRPO LoRA EN

For other models, check the READMEs under scripts/{model_name}/.

III. Supported Models

The table below summarizes currently supported model families and weights. Video and image models share the same inference and training entry. Each row represents one model family; the fourth column is an embedded four-column HTML table (Weight, Hugging Face, ModelScope, Description). ๐Ÿค— is Hugging Face, ๐Ÿค– is ModelScope (recommended for users in mainland China), and - means the corresponding channel has no public repo or requires authentication. For training docs of each model, see 3.3 Training Documents per Model.

Model Family Modality Supported Tasks Weight / Download / Description
Wan2.2-Fun Video Series trained by this project on Wan2.2, covering T2V, I2V, first/last frame, controlled generation, and camera control
Wan2.2-Fun-A14B-InP๐Ÿค—๐Ÿค–Wan2.2-Fun-14B text-to-video generation weights, trained at multiple resolutions, supports start-end image prediction.
Wan2.2-Fun-A14B-Control๐Ÿค—๐Ÿค–Wan2.2-Fun-14B video control weights, supporting various control conditions such as Canny, Depth, Pose, MLSD, etc., and trajectory control. Supports multi-resolution (512, 768, 1024) video prediction at 81 frames, trained at 16 frames per second, with multilingual prediction support.
Wan2.2-Fun-A14B-Control-Camera๐Ÿค—๐Ÿค–Wan2.2-Fun-14B camera lens control weights. Supports multi-resolution (512, 768, 1024) video prediction, trained with 81 frames at 16 FPS, supports multilingual prediction.
Wan2.2-Fun-5B-InP๐Ÿค—๐Ÿค–Wan2.2-Fun-5B text-to-video weights trained at 121 frames, 24 FPS, supporting first/last frame prediction.
Wan2.2-Fun-5B-Control๐Ÿค—๐Ÿค–Wan2.2-Fun-5B video control weights, supporting control conditions like Canny, Depth, Pose, MLSD, and trajectory control. Trained at 121 frames, 24 FPS, with multilingual prediction support.
Wan2.2-Fun-5B-Control-Camera๐Ÿค—๐Ÿค–Wan2.2-Fun-5B camera lens control weights. Trained at 121 frames, 24 FPS, with multilingual prediction support.
Wan2.2-Fun-Reward-LoRAs๐Ÿค—๐Ÿค–Reward LoRAs that optimize Wan2.2-Fun generated videos via reward backpropagation
Wan2.2-VACE-Fun Video Series trained by this project with the VACE scheme, covering controlled generation and subject reference
Wan2.2-VACE-Fun-A14B๐Ÿค—๐Ÿค–Control weights for Wan2.2 trained using the VACE scheme (based on the base model Wan2.2-T2V-A14B), supporting various control conditions such as Canny, Depth, Pose, MLSD, trajectory control, etc. It supports video generation by specifying the subject. It supports multi-resolution (512, 768, 1024) video prediction, and is trained with 81 frames at 16 FPS. It also supports multi-language prediction.
Wan2.2 Video Official Wan weights covering T2V, I2V, audio-driven, and character animation; can be used as training baseline for Wan2.2-Fun
Wan2.2-TI2V-5B๐Ÿค—๐Ÿค–Wan2.2-5B text/image-to-video weights
Wan2.2-T2V-A14B๐Ÿค—๐Ÿค–Wan2.2-14B text-to-video weights
Wan2.2-I2V-A14B๐Ÿค—๐Ÿค–Wan2.2-14B image-to-video weights
Wan2.2-S2V-14B๐Ÿค—๐Ÿค–Wan2.2-14B audio-to-video weights, speaker-driven digital human
Wan2.2-Animate-14B๐Ÿค—๐Ÿค–Wan2.2-14B character replacement and motion transfer weights; repo contains multiple precision files
Wan2.1-Fun V1.1 Video V1.1 series trained by this project on Wan2.1, multi-resolution (512/768/1024), 81 frames at 16fps, covering T2V, I2V, first/last frame, controlled generation, and camera control
Wan2.1-Fun-V1.1-1.3B-InP๐Ÿค—๐Ÿค–Wan2.1-Fun-V1.1-1.3B text-to-video generation weights, trained at multiple resolutions, supports start-end image prediction.
Wan2.1-Fun-V1.1-14B-InP๐Ÿค—๐Ÿค–Wan2.1-Fun-V1.1-14B text-to-video generation weights, trained at multiple resolutions, supports start-end image prediction.
Wan2.1-Fun-V1.1-1.3B-Control๐Ÿค—๐Ÿค–Wan2.1-Fun-V1.1-1.3B video control weights support various control conditions such as Canny, Depth, Pose, MLSD, etc., supports reference image + control condition-based control, and trajectory control. Supports multi-resolution (512, 768, 1024) video prediction, trained with 81 frames at 16 FPS, supports multilingual prediction.
Wan2.1-Fun-V1.1-14B-Control๐Ÿค—๐Ÿค–Wan2.1-Fun-V1.1-14B video control weights support various control conditions such as Canny, Depth, Pose, MLSD, etc., supports reference image + control condition-based control, and trajectory control. Supports multi-resolution (512, 768, 1024) video prediction, trained with 81 frames at 16 FPS, supports multilingual prediction.
Wan2.1-Fun-V1.1-1.3B-Control-Camera๐Ÿค—๐Ÿค–Wan2.1-Fun-V1.1-1.3B camera lens control weights. Supports multi-resolution (512, 768, 1024) video prediction, trained with 81 frames at 16 FPS, supports multilingual prediction.
Wan2.1-Fun-V1.1-14B-Control-Camera๐Ÿค—๐Ÿค–Wan2.1-Fun-V1.1-14B camera lens control weights. Supports multi-resolution (512, 768, 1024) video prediction, trained with 81 frames at 16 FPS, supports multilingual prediction.
Wan2.1-Fun V1.0 Video V1.0 series trained by this project on Wan2.1; same capabilities as V1.1 but without camera control
Wan2.1-Fun-1.3B-InP๐Ÿค—๐Ÿค–Wan2.1-Fun-1.3B text-to-video weights, trained at multiple resolutions, supporting start and end frame prediction.
Wan2.1-Fun-14B-InP๐Ÿค—๐Ÿค–Wan2.1-Fun-14B text-to-video weights, trained at multiple resolutions, supporting start and end frame prediction.
Wan2.1-Fun-1.3B-Control๐Ÿค—๐Ÿค–Wan2.1-Fun-1.3B video control weights, supporting various control conditions such as Canny, Depth, Pose, MLSD, etc., and trajectory control. Supports multi-resolution (512, 768, 1024) video prediction at 81 frames, trained at 16 frames per second, with multilingual prediction support.
Wan2.1-Fun-14B-Control๐Ÿค—๐Ÿค–Wan2.1-Fun-14B video control weights, supporting various control conditions such as Canny, Depth, Pose, MLSD, etc., and trajectory control. Supports multi-resolution (512, 768, 1024) video prediction at 81 frames, trained at 16 frames per second, with multilingual prediction support.
Wan2.1-Fun-Reward-LoRAs๐Ÿค—๐Ÿค–Alignment LoRAs trained with reward backpropagation
Wan2.1 Video Official Wan weights covering T2V, I2V, audio-driven, and controlled generation; can be used as training baseline for Wan2.1-Fun
Wan2.1-T2V-1.3B๐Ÿค—๐Ÿค–1.3Bๆ–‡็”Ÿ่ง†้ข‘
Wan2.1-T2V-14B๐Ÿค—๐Ÿค–14Bๆ–‡็”Ÿ่ง†้ข‘
Wan2.1-I2V-14B-480P๐Ÿค—๐Ÿค–480Pๅ›พ็”Ÿ่ง†้ข‘๏ผŒๆ˜ฏInfiniteTalk็š„ๅŸบ็ก€ๆจกๅž‹
Wan2.1-I2V-14B-720P๐Ÿค—๐Ÿค–Wan 2.1-14B-720P image-to-video model weights
Wan2.1-VACE-1.3B๐Ÿค—๐Ÿค–1.3B VACE control and subject reference
Wan2.1-VACE-14B๐Ÿค—๐Ÿค–14B VACE control and subject reference
Self-Forcing / Causal-Forcing / Flex-Forcing Video Autoregressive distillation schemes covering streaming, interactive generation, and flexible chunked attention
Self-Forcing๐Ÿค—๐Ÿค–Autoregressive distillation weights, use with Wan2.1-T2V for streaming and interactive generation; Flex-Forcing (chunk-wise causal/bidirectional attention) weights are produced by scripts/wan2.1_flex_forcing
TurboWan / TurboDiffusion Video Distilled few-step weights publicly released by the TurboDiffusion scheme
TurboWan2.1-T2V-1.3B-480P๐Ÿค—๐Ÿค–1.3B text-to-video distilled weights; officially released as .pth, the repo also ships a quantised version
TurboWan2.2-I2V-A14B-720P๐Ÿค—๐Ÿค–14B image-to-video distilled weights; the repo contains low/high noise variants (plus quantised). Place them in Personalized_Model and reference via transformer_path / transformer_high_path
CogVideoX-Fun V1.5 Video Official CogVideoX-Fun V1.5 weights, multi-resolution (512/768/1024), 85 frames at 8fps, covering I2V and reward alignment
CogVideoX-Fun-V1.5-5b-InP๐Ÿค—๐Ÿค–Our official graph-generated video model is capable of predicting videos at multiple resolutions (512, 768, 1024) and has been trained on 85 frames at a rate of 8 frames per second.
CogVideoX-Fun-V1.5-Reward-LoRAs๐Ÿค—๐Ÿค–ๅฅ–ๅŠฑๅๅ‘ไผ ๆ’ญ่ฎญ็ปƒ็š„ๅฏน้ฝLoRA
CogVideoX-Fun V1.1 Video Official CogVideoX-Fun V1.1 weights, multi-resolution (512/768/1024/1280), 49 frames at 8fps, covering I2V, pose control, controlled generation, and reward alignment
CogVideoX-Fun-V1.1-2b-InP๐Ÿค—๐Ÿค–Our official graph-generated video model is capable of predicting videos at multiple resolutions (512, 768, 1024, 1280) and has been trained on 49 frames at a rate of 8 frames per second.
CogVideoX-Fun-V1.1-5b-InP๐Ÿค—๐Ÿค–Our official graph-generated video model is capable of predicting videos at multiple resolutions (512, 768, 1024, 1280) and has been trained on 49 frames at a rate of 8 frames per second. Noise has been added to the reference image, and the amplitude of motion is greater compared to V1.0.
CogVideoX-Fun-V1.1-2b-Pose๐Ÿค—๐Ÿค–Our official pose-control video model is capable of predicting videos at multiple resolutions (512, 768, 1024, 1280) and has been trained on 49 frames at a rate of 8 frames per second.
CogVideoX-Fun-V1.1-5b-Pose๐Ÿค—๐Ÿค–Our official pose-control video model is capable of predicting videos at multiple resolutions (512, 768, 1024, 1280) and has been trained on 49 frames at a rate of 8 frames per second.
CogVideoX-Fun-V1.1-2b-Control๐Ÿค—๐Ÿค–Our official control video model is capable of predicting videos at multiple resolutions (512, 768, 1024, 1280) and has been trained on 49 frames at a rate of 8 frames per second. Supporting various control conditions such as Canny, Depth, Pose, MLSD, etc.
CogVideoX-Fun-V1.1-5b-Control๐Ÿค—๐Ÿค–Our official control video model is capable of predicting videos at multiple resolutions (512, 768, 1024, 1280) and has been trained on 49 frames at a rate of 8 frames per second. Supporting various control conditions such as Canny, Depth, Pose, MLSD, etc.
CogVideoX-Fun-V1.1-Reward-LoRAs๐Ÿค—๐Ÿค–ๅฅ–ๅŠฑๅๅ‘ไผ ๆ’ญ่ฎญ็ปƒ็š„ๅฏน้ฝLoRA
CogVideoX-Fun V1.0 Video Legacy weights trained at 49 frames 8fps, superseded by V1.1/V1.5
CogVideoX-Fun-2b-InP๐Ÿค—๐Ÿค–Our official graph-generated video model is capable of predicting videos at multiple resolutions (512, 768, 1024, 1280) and has been trained on 49 frames at a rate of 8 frames per second.
CogVideoX-Fun-5b-InP๐Ÿค—๐Ÿค–Our official graph-generated video model is capable of predicting videos at multiple resolutions (512, 768, 1024, 1280) and has been trained on 49 frames at a rate of 8 frames per second.
HunyuanVideo Video Official diffusers-format weights; this project directly supports inference and LoRA training
HunyuanVideo๐Ÿค—๐Ÿค–ๆ–‡็”Ÿ่ง†้ข‘
HunyuanVideo-I2V๐Ÿค—๐Ÿค–ๅ›พ็”Ÿ่ง†้ข‘
MiniMax-H3 Video Official video generation weights and the ControlNet trained by this project
MiniMax-H3๐Ÿค—๐Ÿค–Official MiniMax-H3 T2V/I2V weights
MiniMax-H3-Fun-Controlnet-Union๐Ÿค—๐Ÿค–ControlNet trained by this project, supports multiple control conditions and trajectory control
MiniMax-H3-Fun-Controlnet-Union-2.0๐Ÿค—๐Ÿค–ControlNet trained by this project (2.0), supporting multiple control conditions, trajectory control, and inpaint checkpoints
TaoMate-H3 Video+Audio Official streaming audio-video generation adapter built on MiniMax-H3
TaoMate-H3-Adapter๐Ÿค—๐Ÿค–Official rank-128 adapter (step-3000 EMA) with a built-in 3-step distilled schedule for streaming speech-driven generation; requires the MiniMax-H3 base weights
LTX-2 Video+Audio Official DiT audio-video joint generation weights
LTX-2๐Ÿค—๐Ÿค–Official audio-video joint generation weights; repo contains multiple precision files
LTX-2.3-Diffusers๐Ÿค—-v2.3 requires community-converted diffusers weights; see Lightricks/LTX-2.3 for official weights
LongCat-Video Video Official long-video generation weights; supports LoRA training
LongCat-Video๐Ÿค—๐Ÿค–Official LongCat-Video T2V weights
LongCat-Video-Avatar๐Ÿค—๐Ÿค–Official LongCat-Video avatar/digital-human weights
FantasyTalking Audio-driven Video Audio-conditioned incremental weights; requires base video weights and audio encoder
FantasyTalking๐Ÿค—๐Ÿค–้œ€ๆญ้…Wan2.1-I2V-14B-720Pไฝฟ็”จ
wav2vec2-base-960h๐Ÿค—๐Ÿค–้Ÿณ้ข‘็ผ–็ ๅ™จ๏ผŒๆ”พๅ…ฅๅŸบ็ก€ๆƒ้‡็›ฎๅฝ•ๅนถๅ‘ฝๅไธบaudio_encoder
InfiniteTalk Audio-driven Video Audio-conditioned incremental weights; requires base video weights and audio encoder
InfiniteTalk๐Ÿค—๐Ÿค–Official InfiniteTalk audio-driven weights
chinese-wav2vec2-base๐Ÿค—๐Ÿค–Chinese audio encoder
FlashHead Audio-driven Video Official high-fidelity audio-driven head weights
SoulX-FlashHead-1_3B๐Ÿค—๐Ÿค–SoulX FlashHead 1.3B audio-driven head weights; requires wav2vec audio encoder
MOVA Video+Audio Official MOVA weights
MOVA-360p๐Ÿค—๐Ÿค–Image-to-video and audio-video joint generation
LingBot Video Camera-controllable world model; directory structure matches Wan2.2-I2V-A14B
lingbot-world-base-cam๐Ÿค—๐Ÿค–Camera-control baseline weights
lingbot-video-rewriter-lora๐Ÿค—๐Ÿค–rewriter LoRA; use with Qwen3.6-27B generated structured captions
lingbot-video-dense-1.3b๐Ÿค—๐Ÿค–1.3B dense video generation weights; trainable on 1-2 GPUs
lingbot-video-moe-30b-a3b๐Ÿค—๐Ÿค–30B MoE (3B active) video generation weights; training requires 8x80GB or more
lingbot-world-fast๐Ÿค—๐Ÿค–Distilled few-step world model checkpoint (16 transformer shards); its VAE/T5 are reused from lingbot-world-base-cam, and inference must use the Flow_Unipc sampler
Phantom Video Incremental weights for multi-subject reference video generation; based on Wan2.1-T2V
Phantom-Wan-1.3B๐Ÿค—-1.3B version. Officially released as .pth; place in Personalized_Model and reference via transformer_path in predict file
Phantom-Wan-14B๐Ÿค—-14B version. Officially released as sharded safetensors
Qwen-Image Image Official text-to-image and image-editing weights; supports baseline and LoRA training
Qwen-Image๐Ÿค—๐Ÿค–ๆ–‡็”Ÿๅ›พๅŸบ็ก€ๆƒ้‡
Qwen-Image-2512๐Ÿค—๐Ÿค–Updated text-to-image version
Qwen-Image-Edit๐Ÿค—๐Ÿค–ๅ›พๅƒ็ผ–่พ‘
Qwen-Image-Edit-2509๐Ÿค—๐Ÿค–ๅ›พๅƒ็ผ–่พ‘ๆ›ดๆ–ฐ็‰ˆๆœฌ
Qwen-Image-Layered๐Ÿค—๐Ÿค–Image layer-decomposition weights; splits an image into multiple editable RGBA layers
Qwen-Image-2.1 Image Official next-generation text-to-image weights; single-stream block-causal transformer with prefix KV cache
Qwen-Image-2.1๐Ÿค—๐Ÿค–Single-stream block-causal transformer; supports full-parameter training, prefix KV cache speeds up inference
Qwen-Image ControlNet Image Image controlled generation; supports Canny, Depth, Pose, MLSD, and Scribble
Qwen-Image-2512-Fun-Controlnet-Union๐Ÿค—๐Ÿค–ControlNet weights for Qwen-Image-2512, supporting multiple control conditions such as Canny, Depth, Pose, MLSD, Scribble, etc.
Qwen-Image-2.1-Fun-Controlnet-Union๐Ÿค—๐Ÿค–ControlNet-Union weights for Qwen-Image-2.1 trained by this project, supporting control conditions such as Canny, Depth, Pose, MLSD, and image inpainting
Qwen-Image-ControlNet-Union๐Ÿค—๐Ÿค–Equivalent ControlNet provided by InstantX
Z-Image Image Official text-to-image weights
Z-Image๐Ÿค—๐Ÿค–ๅŸบ็ก€็‰ˆ
Z-Image-Turbo๐Ÿค—๐Ÿค–ๅŠ ้€Ÿ็‰ˆ
Z-Image-Fun Image ControlNet and distillation LoRA trained by this project on Z-Image; supports Canny, Depth, Pose, MLSD, Scribble, and Gray
Z-Image-Fun-Controlnet-Union-2.1๐Ÿค—๐Ÿค–ControlNet weights for Z-Image. Compared to the first version, it adds to more layers and has been trained for a longer period. It supports multiple control conditions including Canny, Depth, Pose, MLSD, Scribble and Gray.
Z-Image-Turbo-Fun-Controlnet-Union๐Ÿค—๐Ÿค–ControlNet weights for Z-Image-Turbo, supporting multiple control conditions such as Canny, Depth, Pose, MLSD, etc.
Z-Image-Turbo-Fun-Controlnet-Union-2.1๐Ÿค—๐Ÿค–ControlNet weights for Z-Image-Turbo. Compared to the first version, it adds to more layers and has been trained for a longer period. It supports multiple control conditions including Canny, Depth, Pose, MLSD, and more.
Z-Image-Fun-Lora-Distill๐Ÿค—๐Ÿค–This is a Distill LoRA for Z-Image that distills both steps and CFG. This model does not require CFG and uses 8 steps for inference.
Flux Image Official FLUX.1/FLUX.2 weights and the ControlNet trained by this project
FLUX.1-dev๐Ÿค—๐Ÿค–ๆ–‡็”Ÿๅ›พไธŽๅ›พๅƒ็ผ–่พ‘
FLUX.2-dev๐Ÿค—๐Ÿค–็ฌฌไบŒไปฃๅฎ˜ๆ–นๆƒ้‡
FLUX.2-dev-Fun-Controlnet-Union๐Ÿค—๐Ÿค–ControlNet weights for FLUX.2-dev
ERNIE-Image Image Official Baidu text-to-image weights
ERNIE-Image๐Ÿค—๐Ÿค–Official ERNIE-Image text-to-image weights
Lens Image Official Microsoft camera-control weights
Lens-๐Ÿค–Official Lens camera-control weights
Auxiliary Models - Non-generative models used for reward alignment, data annotation, and fast decoding
HPSv3๐Ÿค—๐Ÿค–Scoring model used in reward backpropagation
Qwen2-VL-7B-Instruct๐Ÿค—๐Ÿค–Multimodal encoder used in the video captioning pipeline
taew2_1 / taew2_2--Tiny AutoEncoders (~20 MB) sharing the latent spaces of the Wan2.1 / Wan2.2 VAEs, ~100x faster decoding for previews and low-memory generation; weights from madebyollin/taehv

Notes:

  • Audio-driven and reference models (FantasyTalking, InfiniteTalk, Phantom, TaoMate-H3) are incremental weights and must be used together with the corresponding base video weights and audio encoder.
  • The TurboWan weights released by the TurboDiffusion scheme are listed above; other distillation schemes such as Flex-Forcing and PDD have no publicly released weights โ€” train them following scripts/{model_name}/README_TRAIN*.md and then fill the resulting path into transformer_path.
  • Weight names map one-to-one to folder names under models/Diffusion_Transformer/. Weights within the same family are not interchangeable; choose according to the inference task. If a weight is not listed here, it is either produced by this project or should be obtained from the upstream official repository.

IV. Video Works

Wan2.1-Fun-V1.1-14B-InP && Wan2.1-Fun-V1.1-1.3B-InP

inp_1.mp4
inp_2.mp4
inp_3.mp4
inp_4.mp4
inp_5.mp4
inp_6.mp4
inp_7.mp4
inp_8.mp4
Wan2.1-Fun-V1.1-14B-Control && Wan2.1-Fun-V1.1-1.3B-Control

Generic Control Video + Reference Image:

Reference Image Control Video Wan2.1-Fun-V1.1-14B-Control Wan2.1-Fun-V1.1-1.3B-Control
pose_control.mp4
14b_ref.mp4
1.3b_ref.mp4

Generic Control Video (Canny, Pose, Depth, etc.) and Trajectory Control:

Fun-Trajectory_00003.mp4
Fun-Trajectory-Merge_00003.mp4
Fun_00006.mp4
pose.mp4
canny.mp4
depth.mp4
pose_out.mp4
canny_out.mp4
depth_out.mp4
Wan2.1-Fun-V1.1-14B-Control-Camera && Wan2.1-Fun-V1.1-1.3B-Control-Camera
Pan Up Pan Left Pan Right
Pan_Up.mp4
Pan_Left.mp4
Pan_Right.mp4
Pan Down Pan Up + Pan Left Pan Up + Pan Right
Pan_Down.mp4
Pan_Left_Up.mp4
Pan_Right_Up.mp4
CogVideoX-Fun-V1.1-5B

Resolution-1024

00000005.mp4
00000006.mp4
00000009.mp4
00000010.mp4

Resolution-768

00000001.mp4
00000002.mp4
00000005.mp4
00000006.mp4

Resolution-512

00000036.mp4
00000035.mp4
00000034.mp4
00000033.mp4
CogVideoX-Fun-V1.1-5B-Control
demo_pose.mp4
demo_scribble.mp4
demo_depth.mp4
A young woman with beautiful clear eyes and blonde hair, wearing white clothes and twisting her body, with the camera focused on her face. High quality, masterpiece, best quality, high resolution, ultra-fine, dreamlike. A young woman with beautiful clear eyes and blonde hair, wearing white clothes and twisting her body, with the camera focused on her face. High quality, masterpiece, best quality, high resolution, ultra-fine, dreamlike. A young bear.
00000010.mp4
00000011.mp4
00000012.mp4

V. References

VI. Citation

If you use VideoX-Fun in your research or project, please cite it as follows:

@misc{aigc_apps_VideoX_Fun_2026,
  author = {aigc-apps},
  title = {VideoX-Fun: A Video Generation Pipeline for Diffusion Transformer},
  year = {2026},
  publisher = {GitHub},
  url = {https://github.com/aigc-apps/VideoX-Fun}
}

VII. Limitations and Risks

  • Generated videos may have artifacts or quality issues, especially in complex scenes.
  • The model may struggle with fine details, text rendering, or specific artistic styles.
  • Performance varies with input prompt quality, resolution, and other parameters.
  • The technology could be misused to create misleading content (e.g., deepfakes). Users are responsible for ethical use.
  • The model may reflect biases present in the training data.
  • Users should respect privacy and copyright when using real people's images or videos.

We encourage responsible use and recommend implementing safeguards in production environments.

VIII. License

This project is licensed under the Apache License (Version 2.0).

The CogVideoX-2B model (including its corresponding Transformers module and VAE module) is released under the Apache 2.0 License.

The CogVideoX-5B model (Transformers module) is released under the CogVideoX LICENSE.

About

๐Ÿ“น A more flexible framework that can generate videos at any resolution and creates videos from images.

Resources

Stars

2.3k stars

Watchers

16 watching

Forks

Releases

Packages

Used by

Contributors

Languages