lightx2v commited on
Commit
4db6ec0
·
verified ·
1 Parent(s): a92ea74

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +80 -20
README.md CHANGED
@@ -15,51 +15,107 @@ tags:
15
 
16
  # LightVAE: Towards Compact and Efficient Video Autoencoders
17
 
18
- LightVAE accelerates pretrained video autoencoders through temporal low-rank compression and block pruning while preserving their latent interfaces. This repository provides checkpoints for Wan2.1, Wan2.2, and MiniMax-H3, including versions converted for ComfyUI.
 
 
19
 
20
  **Paper:** *LightVAE: Towards Compact and Efficient Video Autoencoders*
21
  **Code and examples:** [ModelTC/LightVAE](https://github.com/ModelTC/LightVAE)
22
 
23
- ## Checkpoints
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
- | Backbone | Variant | Standard checkpoint | ComfyUI checkpoint |
26
- | --- | --- | --- | --- |
27
- | Wan2.1 | Pro decoder | [`lightvae-pro-wan21-decoder.safetensors`](https://huggingface.co/lightx2v/LightVAE/blob/main/lightvae-pro-wan21-decoder.safetensors) | [`lightvae-pro-wan21-decoder-comfy.safetensors`](https://huggingface.co/lightx2v/LightVAE/blob/main/lightvae-pro-wan21-decoder-comfy.safetensors) |
28
- | Wan2.1 | Lite decoder | [`lightvae-lite-wan21-decoder.safetensors`](https://huggingface.co/lightx2v/LightVAE/blob/main/lightvae-lite-wan21-decoder.safetensors) | [`lightvae-lite-wan21-decoder-comfy.safetensors`](https://huggingface.co/lightx2v/LightVAE/blob/main/lightvae-lite-wan21-decoder-comfy.safetensors) |
29
- | Wan2.2 | Pro decoder | [`lightvae-pro-wan22-decoder.safetensors`](https://huggingface.co/lightx2v/LightVAE/blob/main/lightvae-pro-wan22-decoder.safetensors) | [`lightvae-pro-wan22-decoder-comfy.safetensors`](https://huggingface.co/lightx2v/LightVAE/blob/main/lightvae-pro-wan22-decoder-comfy.safetensors) |
30
- | Wan2.2 | Lite decoder | [`lightvae-lite-wan22-decoder.safetensors`](https://huggingface.co/lightx2v/LightVAE/blob/main/lightvae-lite-wan22-decoder.safetensors) | [`lightvae-lite-wan22-decoder-comfy.safetensors`](https://huggingface.co/lightx2v/LightVAE/blob/main/lightvae-lite-wan22-decoder-comfy.safetensors) |
31
- | MiniMax-H3 | Lite decoder | [`lightvae-lite-h3-decoder.safetensors`](https://huggingface.co/lightx2v/LightVAE/blob/main/lightvae-lite-h3-decoder.safetensors) | [`lightvae-lite-h3-decoder-comfy.safetensors`](https://huggingface.co/lightx2v/LightVAE/blob/main/lightvae-lite-h3-decoder-comfy.safetensors) |
32
- | MiniMax-H3 | Lite encoder | [`lightvae-lite-h3-encoder.safetensors`](https://huggingface.co/lightx2v/LightVAE/blob/main/lightvae-lite-h3-encoder.safetensors) | [`lightvae-lite-h3-encoder-comfy.safetensors`](https://huggingface.co/lightx2v/LightVAE/blob/main/lightvae-lite-h3-encoder-comfy.safetensors) |
33
 
34
- **Pro** retains the original decoder depth for higher reconstruction fidelity. **Lite** applies additional pruning for faster decoding. For Wan2.1 and Wan2.2, pair a LightVAE decoder with the corresponding original VAE encoder. MiniMax-H3 can use its original encoder or the provided Lite encoder. Keep checkpoints matched to their backbone.
35
 
36
- ## Use with ComfyUI
37
 
38
- Choose a checkpoint with the `-comfy.safetensors` suffix for a compatible ComfyUI workflow. Download only the variant you need into your ComfyUI VAE model directory. For example, to download the Wan2.1 Lite decoder:
 
 
 
 
39
 
40
  ```bash
41
  hf download lightx2v/LightVAE \
42
- lightvae-lite-wan21-decoder-comfy.safetensors \
43
- --local-dir ComfyUI/models/vae
44
  ```
45
 
46
- For MiniMax-H3, download the Lite decoder and, if your workflow replaces the encoder too, the Lite encoder. Select the corresponding VAE components in a workflow that supports MiniMax-H3. The ComfyUI checkpoints are separate from the standard checkpoints used by the Python examples below.
 
 
 
47
 
48
- ## Quick start with the Python code
 
 
 
 
 
 
 
 
49
 
50
  ```bash
51
  git clone https://github.com/ModelTC/LightVAE.git
52
  cd LightVAE
53
- pip install -r requirements.txt
 
54
  hf download lightx2v/LightVAE \
55
  lightvae-lite-wan21-decoder.safetensors \
56
  --local-dir weights/LightVAE
57
  ```
58
 
59
- For example, reconstruct a video with the Wan2.1 Lite decoder:
60
 
61
  ```bash
62
- hf download Wan-AI/Wan2.1-T2V-1.3B Wan2.1_VAE.pth --local-dir weights/Wan2.1
 
 
63
 
64
  python infer.py \
65
  --model wan21 --variant lite \
@@ -70,3 +126,7 @@ python infer.py \
70
  ```
71
 
72
  See the [GitHub repository](https://github.com/ModelTC/LightVAE) for Wan2.2 and MiniMax-H3 examples, benchmarks, and visual comparisons.
 
 
 
 
 
15
 
16
  # LightVAE: Towards Compact and Efficient Video Autoencoders
17
 
18
+ LightVAE accelerates pretrained video autoencoders through temporal low-rank compression and block pruning while preserving their latent interfaces.
19
+
20
+ This repository provides checkpoints for **Wan2.1, Wan2.2, and MiniMax-H3**, including exports for our ComfyUI custom node.
21
 
22
  **Paper:** *LightVAE: Towards Compact and Efficient Video Autoencoders*
23
  **Code and examples:** [ModelTC/LightVAE](https://github.com/ModelTC/LightVAE)
24
 
25
+ ## 📦 Checkpoints
26
+
27
+ | Backbone | Variant | Python checkpoint | ComfyUI checkpoint |
28
+ | :-- | :-- | :-- | :-- |
29
+ | Wan2.1 | Pro decoder | [Download](./lightvae-pro-wan21-decoder.safetensors) | [Download](./lightvae-pro-wan21-decoder-comfy.safetensors) |
30
+ | Wan2.1 | Lite decoder | [Download](./lightvae-lite-wan21-decoder.safetensors) | [Download](./lightvae-lite-wan21-decoder-comfy.safetensors) |
31
+ | Wan2.2 | Pro decoder | [Download](./lightvae-pro-wan22-decoder.safetensors) | [Download](./lightvae-pro-wan22-decoder-comfy.safetensors) |
32
+ | Wan2.2 | Lite decoder | [Download](./lightvae-lite-wan22-decoder.safetensors) | [Download](./lightvae-lite-wan22-decoder-comfy.safetensors) |
33
+ | MiniMax-H3 | Lite decoder | [Download](./lightvae-lite-h3-decoder.safetensors) | [Download](./lightvae-lite-h3-decoder-comfy.safetensors) |
34
+ | MiniMax-H3 | Lite encoder | [Download](./lightvae-lite-h3-encoder.safetensors) | [Download](./lightvae-lite-h3-encoder-comfy.safetensors) |
35
+
36
+ **Pro** retains the original decoder depth for higher reconstruction fidelity. **Lite** applies additional pruning for faster inference.
37
+
38
+ Wan models retain their original encoders. MiniMax-H3 can use either its original encoder or the provided Lite encoder.
39
+
40
+ > **Wan2.2 model selection:** Wan2.2 **14B** uses the **Wan2.1 VAE**; Wan2.2 **5B TI2V** uses the **Wan2.2 VAE**. Choose the decoder accordingly.
41
+
42
+ ## ⚡ Use with ComfyUI
43
+
44
+ > **Important:** The `-comfy.safetensors` checkpoints require our **Load LightVAE (TLR)** custom node. Do **not** load them with ComfyUI's standard **Load VAE / VAELoader** node.
45
+
46
+ ### 1. Install the node and download weights
47
+
48
+ Taking **MiniMax-H3** as an example, run these commands in the **same Python environment used by ComfyUI**:
49
+
50
+ ```bash
51
+ cd /path/to/ComfyUI
52
+
53
+ git clone https://github.com/ModelTC/LightVAE.git LightVAE
54
+ python -m pip install ./LightVAE huggingface_hub
55
+ python LightVAE/comfyui/install.py --comfy-root .
56
+
57
+ hf download lightx2v/LightVAE \
58
+ lightvae-lite-h3-decoder-comfy.safetensors \
59
+ --local-dir models/vae/LightVAE
60
+ ```
61
+
62
+ Restart ComfyUI, then add a **Load LightVAE (TLR)** node.
63
+
64
+ ### 2. H3 FL2V: replace the decoder
65
+
66
+ In **Load LightVAE (TLR)**, select:
67
 
68
+ - `decoder`: `lightvae-lite-h3-decoder-comfy.safetensors`
69
+ - `encoder`: `none`
70
+ - Leave `precision`, `backend`, and `device` set to `auto`.
 
 
 
 
 
71
 
72
+ Connect its **VAE output** to your existing **VAE Decode** node.
73
 
74
+ Keep the original VAE connections for first/last-frame encoding unchanged. For this decoder-only connection, `base_vae` can remain disconnected.
75
 
76
+ The same decoder-only replacement also works for **REF2V**.
77
+
78
+ ### 3. H3 REF2V: optionally replace the encoder too
79
+
80
+ To also accelerate reference-image/video encoding, download the Lite encoder:
81
 
82
  ```bash
83
  hf download lightx2v/LightVAE \
84
+ lightvae-lite-h3-encoder-comfy.safetensors \
85
+ --local-dir models/vae/LightVAE
86
  ```
87
 
88
+ Restart ComfyUI and select both H3 Lite files in **Load LightVAE (TLR)**:
89
+
90
+ - `decoder`: `lightvae-lite-h3-decoder-comfy.safetensors`
91
+ - `encoder`: `lightvae-lite-h3-encoder-comfy.safetensors`
92
 
93
+ Connect its **VAE output** to both the **reference-encoding node** and **VAE Decode**. No original video VAE is needed for these connections.
94
+
95
+ **Keep the H3 audio VAE and its connections unchanged in all cases.**
96
+
97
+ See the [ComfyUI guide and example workflows](https://github.com/ModelTC/LightVAE/tree/main/comfyui) for more details and Wan examples.
98
+
99
+ ## 🐍 Quick start with Python
100
+
101
+ Use the standard checkpoints **without** the `-comfy` suffix:
102
 
103
  ```bash
104
  git clone https://github.com/ModelTC/LightVAE.git
105
  cd LightVAE
106
+ python -m pip install -r requirements.txt
107
+
108
  hf download lightx2v/LightVAE \
109
  lightvae-lite-wan21-decoder.safetensors \
110
  --local-dir weights/LightVAE
111
  ```
112
 
113
+ For example, reconstruct a video with the Wan2.1 Lite decoder and original encoder:
114
 
115
  ```bash
116
+ hf download Wan-AI/Wan2.1-T2V-1.3B \
117
+ Wan2.1_VAE.pth \
118
+ --local-dir weights/Wan2.1
119
 
120
  python infer.py \
121
  --model wan21 --variant lite \
 
126
  ```
127
 
128
  See the [GitHub repository](https://github.com/ModelTC/LightVAE) for Wan2.2 and MiniMax-H3 examples, benchmarks, and visual comparisons.
129
+
130
+ ## ⭐ Support Us
131
+
132
+ If you find LightVAE useful, please consider starring [LightVAE](https://github.com/ModelTC/LightVAE) and [LightX2V](https://github.com/ModelTC/LightX2V). Your support helps us keep improving efficient video generation!