Kijai commited on
Commit
1e04aa7
1 Parent(s): 2713093

Upload 9 files

Browse files
CogVideoX-Fun-5b-InP/LICENSE ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The CogVideoX License
2
+
3
+ 1. Definitions
4
+
5
+ “Licensor” means the CogVideoX Model Team that distributes its Software.
6
+
7
+ “Software” means the CogVideoX model parameters made available under this license.
8
+
9
+ 2. License Grant
10
+
11
+ Under the terms and conditions of this license, the licensor hereby grants you a non-exclusive, worldwide, non-transferable, non-sublicensable, revocable, royalty-free copyright license. The intellectual property rights of the generated content belong to the user to the extent permitted by applicable local laws.
12
+ This license allows you to freely use all open-source models in this repository for academic research. Users who wish to use the models for commercial purposes must register and obtain a basic commercial license in https://open.bigmodel.cn/mla/form .
13
+ 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.
14
+ If the number of service users (visits) for your commercial activities exceeds 1 million visits per month, you need to contact our business team to obtain more commercial licenses.
15
+ The above copyright statement and this license statement should be included in all copies or significant portions of this software.
16
+
17
+ 3. Restriction
18
+
19
+ You will not use, copy, modify, merge, publish, distribute, reproduce, or create derivative works of the Software, in whole or in part, for any military, or illegal purposes.
20
+
21
+ You will not use the Software for any act that may undermine China's national security and national unity, harm the public interest of society, or infringe upon the rights and interests of human beings.
22
+
23
+ 4. Disclaimer
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26
+
27
+ 5. Limitation of Liability
28
+
29
+ EXCEPT TO THE EXTENT PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL THEORY, WHETHER BASED IN TORT, NEGLIGENCE, CONTRACT, LIABILITY, OR OTHERWISE WILL ANY LICENSOR BE LIABLE TO YOU FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES, OR ANY OTHER COMMERCIAL LOSSES, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
30
+
31
+ 6. Dispute Resolution
32
+
33
+ This license shall be governed and construed in accordance with the laws of People’s Republic of China. Any dispute arising from or in connection with this License shall be submitted to Haidian District People's Court in Beijing.
34
+
35
+ Note that the license is subject to update to a more comprehensive version. For any questions related to the license and copyright, please contact us at [email protected].
36
+
37
+ 1. 定义
38
+
39
+ “许可方”是指分发其软件的 CogVideoX 模型团队。
40
+
41
+ “软件”是指根据本许可提供的 CogVideoX 模型参数。
42
+
43
+ 2. 许可授予
44
+
45
+ 根据本许可的条款和条件,许可方特此授予您非排他性、全球性、不可转让、不可再许可、可撤销、免版税的版权许可。生成内容的知识产权所属,可根据适用当地法律的规定,在法律允许的范围内由用户享有生成内容的知识产权或其他权利。
46
+ 本许可允许您免费使用本仓库中的所有开源模型进行学术研究。对于希望将模型用于商业目的的用户,需在 https://open.bigmodel.cn/mla/form 完成登记并获得基础商用授权。
47
+
48
+ 经过登记并获得基础商用授权的用户可以免费使用本模型进行商业活动,但必须遵守本许可的所有条款和条件。
49
+ 在本许可证下,您的商业活动的服务用户数量(访问量)不得超过100万人次访问 / 每月。如果超过,您需要与我们的商业团队联系以获得更多的商业许可。
50
+ 上述版权声明和本许可声明应包含在本软件的所有副本或重要部分中。
51
+
52
+ 3.限制
53
+
54
+ 您不得出于任何军事或非法目的使用、复制、修改、合并、发布、分发、复制或创建本软件的全部或部分衍生作品。
55
+
56
+ 您不得利用本软件从事任何危害国家安全和国家统一、危害社会公共利益、侵犯人身权益的行为。
57
+
58
+ 4.免责声明
59
+
60
+ 本软件“按原样”提供,不提供任何明示或暗示的保证,包括但不限于对适销性、特定用途的适用性和非侵权性的保证。
61
+ 在任何情况下,作者或版权持有人均不对任何索赔、损害或其他责任负责,无论是在合同诉讼、侵权行为还是其他方面,由软件或软件的使用或其他交易引起、由软件引起或与之相关 软件。
62
+
63
+ 5. 责任限制
64
+
65
+ 除适用��律禁止的范围外,在任何情况下且根据任何法律理论,无论是基于侵权行为、疏忽、合同、责任或其他原因,任何许可方均不对您承担任何直接、间接、特殊、偶然、示范性、 或间接损害,或任何其他商业损失,即使许可人已被告知此类损害的可能性。
66
+
67
+ 6.争议解决
68
+
69
+ 本许可受中华人民共和国法律管辖并按其解释。 因本许可引起的或与本许可有关的任何争议应提交北京市海淀区人民法院。
70
+
71
+ 请注意,许可证可能会更新到更全面的版本。 有关许可和版权的任何问题,请通过 [email protected] 与我们联系。
CogVideoX-Fun-5b-InP/README.md ADDED
@@ -0,0 +1,257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_link: https://modelscope.cn/models/ZhipuAI/CogVideoX-5B/file/view/master?fileName=LICENSE&status=0
4
+ language:
5
+ - en
6
+ tags:
7
+ - cogvideox
8
+ - video-generation
9
+ - thudm
10
+ - text-to-video
11
+ studios:
12
+ - ZhipuAI/CogVideoX-5b-demo
13
+ inference: false
14
+ ---
15
+
16
+ # CogVideoX-5B
17
+
18
+ <p style="text-align: center;">
19
+ <div align="center">
20
+ <img src=https://modelscope.oss-cn-beijing.aliyuncs.com/resource/cogvideologo.svg width="50%"/>
21
+ </div>
22
+ <p align="center">
23
+ <a href="README_en.md">📄 Read in English</a> |
24
+ <a href="https://huggingface.co/spaces/THUDM/CogVideoX-5B">🤖 ModelScope Space</a> |
25
+ <a href="https://github.com/THUDM/CogVideo">🌐 Github </a> |
26
+ <a href="https://arxiv.org/pdf/2408.06072">📜 arxiv </a>
27
+ </p>
28
+ <p align="center">
29
+ 📍 前往<a href="https://chatglm.cn/video?fr=osm_cogvideox"> 清影</a> 和 <a href="https://open.bigmodel.cn/?utm_campaign=open&_channel_track_key=OWTVNma9"> API平台</a> 体验商业版视频生成模型
30
+ </p>
31
+
32
+ ## 作品案例
33
+
34
+ <div style="display: flex; flex-wrap: wrap; justify-content: space-around;">
35
+ <div style="width: 45%; margin-bottom: 20px; transition: transform 0.3s;">
36
+ <video width="100%" controls>
37
+ <source src="https://modelscope.oss-cn-beijing.aliyuncs.com/resource/agarden.mp4" type="video/mp4">
38
+ </video>
39
+ <div style="text-align: center; margin-top: 10px; font-size: 11px;">A garden comes to life as a kaleidoscope of butterflies flutters amidst the blossoms, their delicate wings casting shadows on the petals below. In the background, a grand fountain cascades water with a gentle splendor, its rhythmic sound providing a soothing backdrop. Beneath the cool shade of a mature tree, a solitary wooden chair invites solitude and reflection, its smooth surface worn by the touch of countless visitors seeking a moment of tranquility in nature's embrace.</div>
40
+ </div>
41
+ <div style="width: 45%; margin-bottom: 20px; transition: transform 0.3s;">
42
+ <video width="100%" controls>
43
+ <source src="https://modelscope.oss-cn-beijing.aliyuncs.com/resource/asmallboy.mp4" type="video/mp4">
44
+ </video>
45
+ <div style="text-align: center; margin-top: 10px; font-size: 11px;">A small boy, head bowed and determination etched on his face, sprints through the torrential downpour as lightning crackles and thunder rumbles in the distance. The relentless rain pounds the ground, creating a chaotic dance of water droplets that mirror the dramatic sky's anger. In the far background, the silhouette of a cozy home beckons, a faint beacon of safety and warmth amidst the fierce weather. The scene is one of perseverance and the unyielding spirit of a child braving the elements.</div>
46
+ </div>
47
+ <div style="width: 45%; margin-bottom: 20px; transition: transform 0.3s;">
48
+ <video width="100%" controls>
49
+ <source src="https://modelscope.oss-cn-beijing.aliyuncs.com/resource/asuitedantronaut.mp4" type="video/mp4">
50
+ </video>
51
+ <div style="text-align: center; margin-top: 10px; font-size: 11px;">A suited astronaut, with the red dust of Mars clinging to their boots, reaches out to shake hands with an alien being, their skin a shimmering blue, under the pink-tinged sky of the fourth planet. In the background, a sleek silver rocket, a beacon of human ingenuity, stands tall, its engines powered down, as the two representatives of different worlds exchange a historic greeting amidst the desolate beauty of the Martian landscape.</div>
52
+ </div>
53
+ <div style="width: 45%; margin-bottom: 20px; transition: transform 0.3s;">
54
+ <video width="100%" controls>
55
+ <source src="https://modelscope.oss-cn-beijing.aliyuncs.com/resource/anelderly.mp4" type="video/mp4">
56
+ </video>
57
+ <div style="text-align: center; margin-top: 10px; font-size: 11px;">An elderly gentleman, with a serene expression, sits at the water's edge, a steaming cup of tea by his side. He is engrossed in his artwork, brush in hand, as he renders an oil painting on a canvas that's propped up against a small, weathered table. The sea breeze whispers through his silver hair, gently billowing his loose-fitting white shirt, while the salty air adds an intangible element to his masterpiece in progress. The scene is one of tranquility and inspiration, with the artist's canvas capturing the vibrant hues of the setting sun reflecting off the tranquil sea.</div>
58
+ </div>
59
+ <div style="width: 45%; margin-bottom: 20px; transition: transform 0.3s;">
60
+ <video width="100%" controls>
61
+ <source src="https://modelscope.oss-cn-beijing.aliyuncs.com/resource/inadimly.mp4" type="video/mp4">
62
+ </video>
63
+ <div style="text-align: center; margin-top: 10px; font-size: 11px;">In a dimly lit bar, purplish light bathes the face of a mature man, his eyes blinking thoughtfully as he ponders in close-up, the background artfully blurred to focus on his introspective expression, the ambiance of the bar a mere suggestion of shadows and soft lighting.</div>
64
+ </div>
65
+ <div style="width: 45%; margin-bottom: 20px; transition: transform 0.3s;">
66
+ <video width="100%" controls>
67
+ <source src="https://modelscope.oss-cn-beijing.aliyuncs.com/resource/agolden.mp4" type="video/mp4">
68
+ </video>
69
+ <div style="text-align: center; margin-top: 10px; font-size: 11px;">A golden retriever, sporting sleek black sunglasses, with its lengthy fur flowing in the breeze, sprints playfully across a rooftop terrace, recently refreshed by a light rain. The scene unfolds from a distance, the dog's energetic bounds growing larger as it approaches the camera, its tail wagging with unrestrained joy, while droplets of water glisten on the concrete behind it. The overcast sky provides a dramatic backdrop, emphasizing the vibrant golden coat of the canine as it dashes towards the viewer.</div>
70
+ </div>
71
+ <div style="width: 45%; margin-bottom: 20px; transition: transform 0.3s;">
72
+ <video width="100%" controls>
73
+ <source src="https://modelscope.oss-cn-beijing.aliyuncs.com/resource/onasunnyday.mp4" type="video/mp4">
74
+ </video>
75
+ <div style="text-align: center; margin-top: 10px; font-size: 11px;">On a brilliant sunny day, the lakeshore is lined with an array of willow trees, their slender branches swaying gently in the soft breeze. The tranquil surface of the lake reflects the clear blue sky, while several elegant swans glide gracefully through the still water, leaving behind delicate ripples that disturb the mirror-like quality of the lake. The scene is one of serene beauty, with the willows' greenery providing a picturesque frame for the peaceful avian visitors.</div>
76
+ </div>
77
+ <div style="width: 45%; margin-bottom: 20px; transition: transform 0.3s;">
78
+ <video width="100%" controls>
79
+ <source src="https://modelscope.oss-cn-beijing.aliyuncs.com/resource/achinese.mp4" type="video/mp4">
80
+ </video>
81
+ <div style="text-align: center; margin-top: 10px; font-size: 11px;">A Chinese mother, draped in a soft, pastel-colored robe, gently rocks back and forth in a cozy rocking chair positioned in the tranquil setting of a nursery. The dimly lit bedroom is adorned with whimsical mobiles dangling from the ceiling, casting shadows that dance on the walls. Her baby, swaddled in a delicate, patterned blanket, rests against her chest, the child's earlier cries now replaced by contented coos as the mother's soothing voice lulls the little one to sleep. The scent of lavender fills the air, adding to the serene atmosphere, while a warm, orange glow from a nearby nightlight illuminates the scene with a gentle hue, capturing a moment of tender love and comfort.</div>
82
+ </div>
83
+ </div>
84
+
85
+ ## 模型介绍
86
+
87
+ CogVideoX是 [清影](https://chatglm.cn/video?fr=osm_cogvideo) 同源的开源版本视频生成模型。下表展示目前我们提供的视频生成模型列表,以及相关基础信息。
88
+
89
+ <table style="border-collapse: collapse; width: 100%;">
90
+ <tr>
91
+ <th style="text-align: center;">模型名</th>
92
+ <th style="text-align: center;">CogVideoX-2B (本仓库)</th>
93
+ <th style="text-align: center;">CogVideoX-5B </th>
94
+ </tr>
95
+ <tr>
96
+ <td style="text-align: center;">模型介绍</td>
97
+ <td style="text-align: center;">入门级模型,兼顾兼容性。运行,二次开发成本低。</td>
98
+ <td style="text-align: center;">视频生成质量更高,视觉效果更好的更大尺寸模型。</td>
99
+ </tr>
100
+ <tr>
101
+ <td style="text-align: center;">推理精度</td>
102
+ <td style="text-align: center;"><b>FP16*(推荐)</b>, BF16, FP32,FP8*,INT8,不支持INT4</td>
103
+ <td style="text-align: center;"><b>BF16(推荐)</b>, FP16, FP32,FP8*,INT8,不支持INT4</td>
104
+ </tr>
105
+ <tr>
106
+ <td style="text-align: center;">单GPU显存消耗<br></td>
107
+ <td style="text-align: center;"><a href="https://github.com/THUDM/SwissArmyTransformer">SAT</a> FP16: 18GB <br><b>diffusers FP16: 4GB起* </b><br><b>diffusers INT8(torchao): 3.6G起*</b></td>
108
+ <td style="text-align: center;"><a href="https://github.com/THUDM/SwissArmyTransformer">SAT</a> BF16: 26GB <br><b>diffusers BF16 : 5GB起* </b><br><b>diffusers INT8(torchao): 4.4G起* </b></td>
109
+ </tr>
110
+ <tr>
111
+ <td style="text-align: center;">多GPU推理显存消耗</td>
112
+ <td style="text-align: center;"><b>FP16: 10GB* using diffusers</b><br></td>
113
+ <td style="text-align: center;"><b>BF16: 15GB* using diffusers</b><br></td>
114
+ </tr>
115
+ <tr>
116
+ <td style="text-align: center;">推理速度<br>(Step = 50, FP/BF16)</td>
117
+ <td style="text-align: center;">单卡A100: ~90秒<br>单卡H100: ~45秒</td>
118
+ <td style="text-align: center;">单卡A100: ~180秒<br>单卡H100: ~90秒</td>
119
+ </tr>
120
+ <tr>
121
+ <td style="text-align: center;">微调精度</td>
122
+ <td style="text-align: center;"><b>FP16</b></td>
123
+ <td style="text-align: center;"><b>BF16</b></td>
124
+ </tr>
125
+ <tr>
126
+ <td style="text-align: center;">微调显存消耗(每卡)</td>
127
+ <td style="text-align: center;">47 GB (bs=1, LORA)<br> 61 GB (bs=2, LORA)<br> 62GB (bs=1, SFT)</td>
128
+ <td style="text-align: center;">63 GB (bs=1, LORA)<br> 80 GB (bs=2, LORA)<br> 75GB (bs=1, SFT)<br></td>
129
+ </tr>
130
+ <tr>
131
+ <td style="text-align: center;">提示词语言</td>
132
+ <td colspan="2" style="text-align: center;">English*</td>
133
+ </tr>
134
+ <tr>
135
+ <td style="text-align: center;">提示词长度上限</td>
136
+ <td colspan="2" style="text-align: center;">226 Tokens</td>
137
+ </tr>
138
+ <tr>
139
+ <td style="text-align: center;">视频长度</td>
140
+ <td colspan="2" style="text-align: center;">6 秒</td>
141
+ </tr>
142
+ <tr>
143
+ <td style="text-align: center;">帧率</td>
144
+ <td colspan="2" style="text-align: center;">8 帧 / 秒 </td>
145
+ </tr>
146
+ <tr>
147
+ <td style="text-align: center;">视频分辨率</td>
148
+ <td colspan="2" style="text-align: center;">720 * 480,不支持其他分辨率(含微调)</td>
149
+ </tr>
150
+ <tr>
151
+ <td style="text-align: center;">位置编码</td>
152
+ <td style="text-align: center;">3d_sincos_pos_embed</td>
153
+ <td style="text-align: center;">3d_rope_pos_embed<br></td>
154
+ </tr>
155
+ </table>
156
+
157
+ **数据解释**
158
+
159
+ + 使用 diffusers 库进行测试时,启用了全部`diffusers`库自带的优化,该方案未测试在非**NVIDIA A100 / H100** 外的设备上的实际显存 / 内存占用。通常,该方案可以适配于所有 **NVIDIA 安培架构**
160
+ 以上的设备。若关闭优化,显存占用会成倍增加,峰值显存约为表格的3倍。但速度提升3-4倍左右。你可以选择性的关闭部分优化,这些优化包括:
161
+ ```
162
+ pipe.enable_model_cpu_offload()
163
+ pipe.enable_sequential_cpu_offload()
164
+ pipe.vae.enable_slicing()
165
+ pipe.vae.enable_tiling()
166
+ ```
167
+
168
+ + 多GPU推理时,需要关闭 `enable_model_cpu_offload()` 优化。
169
+ + 使用 INT8 模型会导致推理速度降低,此举是为了满足显存较低的显卡能正常推理并保持较少的视频质量损失,推理速度大幅降低。
170
+ + 2B 模型采用 `FP16` 精度训练, 5B模型采用 `BF16` 精度训练。我们推荐使用模型训练的精度进行推理。
171
+ + [PytorchAO](https://github.com/pytorch/ao) 和 [Optimum-quanto](https://github.com/huggingface/optimum-quanto/)
172
+ 可以用于量化文本编码器、Transformer 和 VAE 模块,以降低 CogVideoX 的内存需求。这使得在免费的 T4 Colab 或更小显存的 GPU
173
+ 上运行模型成为可能!同样值得注意的是,TorchAO 量化完全兼容 `torch.compile`,这可以显著提高推理速度。在 `NVIDIA H100`
174
+ 及以上设备上必须使用 `FP8` 精度,这需要源码安装 `torch`、`torchao`、`diffusers` 和 `accelerate` Python
175
+ 包。建议使用 `CUDA 12.4`。
176
+ + 推理速度测试同样采用了上述显存优化方案,不采用显存优化的情况下,推理速度提升约10%。 只有`diffusers`版本模型支持量化。
177
+ + 模型仅支持英语输入,其他语言可以通过大模型润色时翻译为英语。
178
+
179
+ **提醒**
180
+
181
+ + 使用 [SAT](https://github.com/THUDM/SwissArmyTransformer) 推理和微调SAT版本模型。欢迎前往我们的github查看。
182
+
183
+ ## 快速上手 🤗
184
+
185
+ 本模型已经支持使用 huggingface 的 diffusers 库进行部署,你可以按照以下步骤进行部署。
186
+
187
+ **我们推荐您进入我们的 [github](https://github.com/THUDM/CogVideo) 并查看相关的提示词优化和转换,以获得更好的体验。**
188
+
189
+ 1. 安装对应的依赖
190
+
191
+ ```shell
192
+ # diffusers>=0.30.1
193
+ # transformers>=0.44.0
194
+ # accelerate>=0.33.0 (suggest install from source)
195
+ # imageio-ffmpeg>=0.5.1
196
+ pip install --upgrade transformers accelerate diffusers imageio-ffmpeg
197
+ ```
198
+
199
+ 2. 运行代码 (BF16 / FP16)
200
+
201
+ ```python
202
+ import torch
203
+ from diffusers import CogVideoXPipeline
204
+ from diffusers.utils import export_to_video
205
+ from modelscope import snapshot_download
206
+
207
+ model_dir = snapshot_download("ZhipuAI/CogVideoX-5b")
208
+ 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."
209
+
210
+ pipe = CogVideoXPipeline.from_pretrained(
211
+ model_dir,
212
+ torch_dtype=torch.bfloat16
213
+ )
214
+
215
+ pipe.enable_model_cpu_offload()
216
+ pipe.enable_sequential_cpu_offload()
217
+ pipe.vae.enable_slicing()
218
+ pipe.vae.enable_tiling()
219
+
220
+ video = pipe(
221
+ prompt=prompt,
222
+ num_videos_per_prompt=1,
223
+ num_inference_steps=50,
224
+ num_frames=49,
225
+ guidance_scale=6,
226
+ generator=torch.Generator(device="cuda").manual_seed(42),
227
+ ).frames[0]
228
+
229
+ export_to_video(video, "output.mp4", fps=8)
230
+ ```
231
+
232
+ ## 深入研究
233
+
234
+ 欢迎进入我们的 [github](https://github.com/THUDM/CogVideo),你将获得:
235
+
236
+ 1. 更加详细的技术细节介绍和代码解释。
237
+ 2. 提示词的优化和转换。
238
+ 3. SAT版本模型进行推理和微调,甚至预发布。
239
+ 4. 项目更新日志动态,更多互动机会。
240
+ 5. CogVideoX 工具链,帮助您更好的使用模型。
241
+ 6. INT8 模型推理代码。
242
+
243
+ ## 模型协议
244
+
245
+ 该模型根据 [CogVideoX LICENSE](https://modelscope.cn/models/ZhipuAI/CogVideoX-5B/file/view/master?fileName=LICENSE&status=0)
246
+ 许可证发布。
247
+
248
+ ## 引用
249
+
250
+ ```
251
+ @article{yang2024cogvideox,
252
+ title={CogVideoX: Text-to-Video Diffusion Models with An Expert Transformer},
253
+ author={Yang, Zhuoyi and Teng, Jiayan and Zheng, Wendi and Ding, Ming and Huang, Shiyu and Xu, Jiazheng and Yang, Yuanming and Hong, Wenyi and Zhang, Xiaohan and Feng, Guanyu and others},
254
+ journal={arXiv preprint arXiv:2408.06072},
255
+ year={2024}
256
+ }
257
+ ```
CogVideoX-Fun-5b-InP/README_en.md ADDED
@@ -0,0 +1,284 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CogVideoX-5B
2
+
3
+ <p style="text-align: center;">
4
+ <div align="center">
5
+ <img src=https://github.com/THUDM/CogVideo/raw/main/resources/logo.svg width="50%"/>
6
+ </div>
7
+ <p align="center">
8
+ <a href="README.md">📄 中文阅读</a> |
9
+ <a href="https://huggingface.co/spaces/THUDM/CogVideoX-5B">🤖 ModelScope Space</a> |
10
+ <a href="https://github.com/THUDM/CogVideo">🌐 Github </a> |
11
+ <a href="https://arxiv.org/pdf/2408.06072">📜 arxiv </a>
12
+ </p>
13
+ <p align="center">
14
+ 📍 Visit <a href="https://chatglm.cn/video?lang=en?fr=osm_cogvideo">QingYing</a> and <a href="https://open.bigmodel.cn/?utm_campaign=open&_channel_track_key=OWTVNma9">API Platform</a> to experience commercial video generation models.
15
+ </p>
16
+
17
+ ## Demo Show
18
+
19
+ <!DOCTYPE html>
20
+ <html lang="en">
21
+ <head>
22
+ <meta charset="UTF-8">
23
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
24
+ <title>Video Gallery with Captions</title>
25
+ <style>
26
+ .video-container {
27
+ display: flex;
28
+ flex-wrap: wrap;
29
+ justify-content: space-around;
30
+ }
31
+ .video-item {
32
+ width: 45%;
33
+ margin-bottom: 20px;
34
+ transition: transform 0.3s;
35
+ }
36
+ .video-item:hover {
37
+ transform: scale(1.1);
38
+ }
39
+ .caption {
40
+ text-align: center;
41
+ margin-top: 10px;
42
+ font-size: 11px;
43
+ }
44
+ </style>
45
+ </head>
46
+ <body>
47
+ <div class="video-container">
48
+ <div class="video-item">
49
+ <video width="100%" controls>
50
+ <source src="https://github.com/user-attachments/assets/cf5953ea-96d3-48fd-9907-c4708752c714" type="video/mp4">
51
+ </video>
52
+ <div class="caption">A garden comes to life as a kaleidoscope of butterflies flutters amidst the blossoms, their delicate wings casting shadows on the petals below. In the background, a grand fountain cascades water with a gentle splendor, its rhythmic sound providing a soothing backdrop. Beneath the cool shade of a mature tree, a solitary wooden chair invites solitude and reflection, its smooth surface worn by the touch of countless visitors seeking a moment of tranquility in nature's embrace.</div>
53
+ </div>
54
+ <div class="video-item">
55
+ <video width="100%" controls>
56
+ <source src="https://github.com/user-attachments/assets/fe0a78e6-b669-4800-8cf0-b5f9b5145b52" type="video/mp4">
57
+ </video>
58
+ <div class="caption">A small boy, head bowed and determination etched on his face, sprints through the torrential downpour as lightning crackles and thunder rumbles in the distance. The relentless rain pounds the ground, creating a chaotic dance of water droplets that mirror the dramatic sky's anger. In the far background, the silhouette of a cozy home beckons, a faint beacon of safety and warmth amidst the fierce weather. The scene is one of perseverance and the unyielding spirit of a child braving the elements.</div>
59
+ </div>
60
+ <div class="video-item">
61
+ <video width="100%" controls>
62
+ <source src="https://github.com/user-attachments/assets/c182f606-8f8c-421d-b414-8487070fcfcb" type="video/mp4">
63
+ </video>
64
+ <div class="caption">A suited astronaut, with the red dust of Mars clinging to their boots, reaches out to shake hands with an alien being, their skin a shimmering blue, under the pink-tinged sky of the fourth planet. In the background, a sleek silver rocket, a beacon of human ingenuity, stands tall, its engines powered down, as the two representatives of different worlds exchange a historic greeting amidst the desolate beauty of the Martian landscape.</div>
65
+ </div>
66
+ <div class="video-item">
67
+ <video width="100%" controls>
68
+ <source src="https://github.com/user-attachments/assets/7db2bbce-194d-434d-a605-350254b6c298" type="video/mp4">
69
+ </video>
70
+ <div class="caption">An elderly gentleman, with a serene expression, sits at the water's edge, a steaming cup of tea by his side. He is engrossed in his artwork, brush in hand, as he renders an oil painting on a canvas that's propped up against a small, weathered table. The sea breeze whispers through his silver hair, gently billowing his loose-fitting white shirt, while the salty air adds an intangible element to his masterpiece in progress. The scene is one of tranquility and inspiration, with the artist's canvas capturing the vibrant hues of the setting sun reflecting off the tranquil sea.</div>
71
+ </div>
72
+ <div class="video-item">
73
+ <video width="100%" controls>
74
+ <source src="https://github.com/user-attachments/assets/62b01046-8cab-44cc-bd45-4d965bb615ec" type="video/mp4">
75
+ </video>
76
+ <div class="caption">In a dimly lit bar, purplish light bathes the face of a mature man, his eyes blinking thoughtfully as he ponders in close-up, the background artfully blurred to focus on his introspective expression, the ambiance of the bar a mere suggestion of shadows and soft lighting.</div>
77
+ </div>
78
+ <div class="video-item">
79
+ <video width="100%" controls>
80
+ <source src="https://github.com/user-attachments/assets/d78e552a-4b3f-4b81-ac3f-3898079554f6" type="video/mp4">
81
+ </video>
82
+ <div class="caption">A golden retriever, sporting sleek black sunglasses, with its lengthy fur flowing in the breeze, sprints playfully across a rooftop terrace, recently refreshed by a light rain. The scene unfolds from a distance, the dog's energetic bounds growing larger as it approaches the camera, its tail wagging with unrestrained joy, while droplets of water glisten on the concrete behind it. The overcast sky provides a dramatic backdrop, emphasizing the vibrant golden coat of the canine as it dashes towards the viewer.</div>
83
+ </div>
84
+ <div class="video-item">
85
+ <video width="100%" controls>
86
+ <source src="https://github.com/user-attachments/assets/30894f12-c741-44a2-9e6e-ddcacc231e5b" type="video/mp4">
87
+ </video>
88
+ <div class="caption">On a brilliant sunny day, the lakeshore is lined with an array of willow trees, their slender branches swaying gently in the soft breeze. The tranquil surface of the lake reflects the clear blue sky, while several elegant swans glide gracefully through the still water, leaving behind delicate ripples that disturb the mirror-like quality of the lake. The scene is one of serene beauty, with the willows' greenery providing a picturesque frame for the peaceful avian visitors.</div>
89
+ </div>
90
+ <div class="video-item">
91
+ <video width="100%" controls>
92
+ <source src="https://github.com/user-attachments/assets/926575ca-7150-435b-a0ff-4900a963297b" type="video/mp4">
93
+ </video>
94
+ <div class="caption">A Chinese mother, draped in a soft, pastel-colored robe, gently rocks back and forth in a cozy rocking chair positioned in the tranquil setting of a nursery. The dimly lit bedroom is adorned with whimsical mobiles dangling from the ceiling, casting shadows that dance on the walls. Her baby, swaddled in a delicate, patterned blanket, rests against her chest, the child's earlier cries now replaced by contented coos as the mother's soothing voice lulls the little one to sleep. The scent of lavender fills the air, adding to the serene atmosphere, while a warm, orange glow from a nearby nightlight illuminates the scene with a gentle hue, capturing a moment of tender love and comfort.</div>
95
+ </div>
96
+ </div>
97
+ </body>
98
+ </html>
99
+
100
+ ## Model Introduction
101
+
102
+ CogVideoX is an open-source version of the video generation model originating
103
+ from [QingYing](https://chatglm.cn/video?lang=en?fr=osm_cogvideo). The table below displays the list of video generation
104
+ models we currently offer, along with their foundational information.
105
+
106
+ <table style="border-collapse: collapse; width: 100%;">
107
+ <tr>
108
+ <th style="text-align: center;">Model Name</th>
109
+ <th style="text-align: center;">CogVideoX-2B</th>
110
+ <th style="text-align: center;">CogVideoX-5B (This Repository)</th>
111
+ </tr>
112
+ <tr>
113
+ <td style="text-align: center;">Model Description</td>
114
+ <td style="text-align: center;">Entry-level model, balancing compatibility. Low cost for running and secondary development.</td>
115
+ <td style="text-align: center;">Larger model with higher video generation quality and better visual effects.</td>
116
+ </tr>
117
+ <tr>
118
+ <td style="text-align: center;">Inference Precision</td>
119
+ <td style="text-align: center;"><b>FP16* (Recommended)</b>, BF16, FP32, FP8*, INT8, no support for INT4</td>
120
+ <td style="text-align: center;"><b>BF16 (Recommended)</b>, FP16, FP32, FP8*, INT8, no support for INT4</td>
121
+ </tr>
122
+ <tr>
123
+ <td style="text-align: center;">Single GPU VRAM Consumption<br></td>
124
+ <td style="text-align: center;"><a href="https://github.com/THUDM/SwissArmyTransformer">SAT</a> FP16: 18GB <br><b>diffusers FP16: starting from 4GB*</b><br><b>diffusers INT8(torchao): starting from 3.6GB*</b></td>
125
+ <td style="text-align: center;"><a href="https://github.com/THUDM/SwissArmyTransformer">SAT</a> BF16: 26GB <br><b>diffusers BF16: starting from 5GB*</b><br><b>diffusers INT8(torchao): starting from 4.4GB*</b></td>
126
+ </tr>
127
+ <tr>
128
+ <td style="text-align: center;">Multi-GPU Inference VRAM Consumption</td>
129
+ <td style="text-align: center;"><b>FP16: 10GB* using diffusers</b></td>
130
+ <td style="text-align: center;"><b>BF16: 15GB* using diffusers</b></td>
131
+ </tr>
132
+ <tr>
133
+ <td style="text-align: center;">Inference Speed<br>(Step = 50, FP/BF16)</td>
134
+ <td style="text-align: center;">Single A100: ~90 seconds<br>Single H100: ~45 seconds</td>
135
+ <td style="text-align: center;">Single A100: ~180 seconds<br>Single H100: ~90 seconds</td>
136
+ </tr>
137
+ <tr>
138
+ <td style="text-align: center;">Fine-tuning Precision</td>
139
+ <td style="text-align: center;"><b>FP16</b></td>
140
+ <td style="text-align: center;"><b>BF16</b></td>
141
+ </tr>
142
+ <tr>
143
+ <td style="text-align: center;">Fine-tuning VRAM Consumption (per GPU)</td>
144
+ <td style="text-align: center;">47 GB (bs=1, LORA)<br> 61 GB (bs=2, LORA)<br> 62GB (bs=1, SFT)</td>
145
+ <td style="text-align: center;">63 GB (bs=1, LORA)<br> 80 GB (bs=2, LORA)<br> 75GB (bs=1, SFT)</td>
146
+ </tr>
147
+ <tr>
148
+ <td style="text-align: center;">Prompt Language</td>
149
+ <td colspan="2" style="text-align: center;">English*</td>
150
+ </tr>
151
+ <tr>
152
+ <td style="text-align: center;">Prompt Length Limit</td>
153
+ <td colspan="2" style="text-align: center;">226 Tokens</td>
154
+ </tr>
155
+ <tr>
156
+ <td style="text-align: center;">Video Length</td>
157
+ <td colspan="2" style="text-align: center;">6 Seconds</td>
158
+ </tr>
159
+ <tr>
160
+ <td style="text-align: center;">Frame Rate</td>
161
+ <td colspan="2" style="text-align: center;">8 Frames per Second</td>
162
+ </tr>
163
+ <tr>
164
+ <td style="text-align: center;">Video Resolution</td>
165
+ <td colspan="2" style="text-align: center;">720 x 480, no support for other resolutions (including fine-tuning)</td>
166
+ </tr>
167
+ <tr>
168
+ <td style="text-align: center;">Positional Encoding</td>
169
+ <td style="text-align: center;">3d_sincos_pos_embed</td>
170
+ <td style="text-align: center;">3d_rope_pos_embed</td>
171
+ </tr>
172
+ </table>
173
+
174
+ **Data Explanation**
175
+
176
+ + When testing using the `diffusers` library, all optimizations provided by the `diffusers` library were enabled. This
177
+ solution has not been tested for actual VRAM/memory usage on devices other than **NVIDIA A100 / H100**. Generally,
178
+ this solution can be adapted to all devices with **NVIDIA Ampere architecture** and above. If the optimizations are
179
+ disabled, VRAM usage will increase significantly, with peak VRAM usage being about 3 times higher than the table
180
+ shows. However, speed will increase by 3-4 times. You can selectively disable some optimizations, including:
181
+
182
+ ```
183
+ pipe.enable_model_cpu_offload()
184
+ pipe.enable_sequential_cpu_offload()
185
+ pipe.vae.enable_slicing()
186
+ pipe.vae.enable_tiling()
187
+ ```
188
+
189
+ + When performing multi-GPU inference, the `enable_model_cpu_offload()` optimization needs to be disabled.
190
+ + Using INT8 models will reduce inference speed. This is to ensure that GPUs with lower VRAM can perform inference
191
+ normally while maintaining minimal video quality loss, though inference speed will decrease significantly.
192
+ + The 2B model is trained with `FP16` precision, and the 5B model is trained with `BF16` precision. We recommend using
193
+ the precision the model was trained with for inference.
194
+ + [PytorchAO](https://github.com/pytorch/ao) and [Optimum-quanto](https://github.com/huggingface/optimum-quanto/) can be
195
+ used to quantize the text encoder, Transformer, and VAE modules to reduce CogVideoX's memory requirements. This makes
196
+ it possible to run the model on a free T4 Colab or GPUs with smaller VRAM! It is also worth noting that TorchAO
197
+ quantization is fully compatible with `torch.compile`, which can significantly improve inference speed. `FP8`
198
+ precision must be used on devices with `NVIDIA H100` or above, which requires installing
199
+ the `torch`, `torchao`, `diffusers`, and `accelerate` Python packages from source. `CUDA 12.4` is recommended.
200
+ + The inference speed test also used the above VRAM optimization scheme. Without VRAM optimization, inference speed
201
+ increases by about 10%. Only the `diffusers` version of the model supports quantization.
202
+ + The model only supports English input; other languages can be translated into English during refinement by a large
203
+ model.
204
+
205
+ **Note**
206
+
207
+ + Using [SAT](https://github.com/THUDM/SwissArmyTransformer) for inference and fine-tuning of SAT version
208
+ models. Feel free to visit our GitHub for more information.
209
+
210
+
211
+
212
+ ## Quick Start 🤗
213
+
214
+ This model supports deployment using the huggingface diffusers library. You can deploy it by following these steps.
215
+
216
+ **We recommend that you visit our [GitHub](https://github.com/THUDM/CogVideo) and check out the relevant prompt
217
+ optimizations and conversions to get a better experience.**
218
+
219
+ 1. Install the required dependencies
220
+
221
+ ```shell
222
+ # diffusers>=0.30.1
223
+ # transformers>=0.44.0
224
+ # accelerate>=0.33.0 (suggest install from source)
225
+ # imageio-ffmpeg>=0.5.1
226
+ pip install --upgrade transformers accelerate diffusers imageio-ffmpeg
227
+ ```
228
+
229
+ 2. Run the code
230
+
231
+ ```python
232
+ import torch
233
+ from diffusers import CogVideoXPipeline
234
+ from diffusers.utils import export_to_video
235
+
236
+ 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."
237
+
238
+ pipe = CogVideoXPipeline.from_pretrained(
239
+ "THUDM/CogVideoX-5b",
240
+ torch_dtype=torch.bfloat16
241
+ )
242
+
243
+ pipe.enable_model_cpu_offload()
244
+ pipe.enable_sequential_cpu_offload()
245
+ pipe.vae.enable_slicing()
246
+ pipe.vae.enable_tiling()
247
+
248
+ video = pipe(
249
+ prompt=prompt,
250
+ num_videos_per_prompt=1,
251
+ num_inference_steps=50,
252
+ num_frames=49,
253
+ guidance_scale=6,
254
+ generator=torch.Generator(device="cuda").manual_seed(42),
255
+ ).frames[0]
256
+
257
+ export_to_video(video, "output.mp4", fps=8)
258
+ ```
259
+
260
+ ## Explore the Model
261
+
262
+ Welcome to our [github](https://github.com/THUDM/CogVideo), where you will find:
263
+
264
+ 1. More detailed technical details and code explanation.
265
+ 2. Optimization and conversion of prompt words.
266
+ 3. Reasoning and fine-tuning of SAT version models, and even pre-release.
267
+ 4. Project update log dynamics, more interactive opportunities.
268
+ 5. CogVideoX toolchain to help you better use the model.
269
+ 6. INT8 model inference code support.
270
+
271
+ ## Model License
272
+
273
+ This model is released under the [CogVideoX LICENSE](https://modelscope.cn/models/ZhipuAI/CogVideoX-5B/file/view/master?fileName=LICENSE&status=0).
274
+
275
+ ## Citation
276
+
277
+ ```
278
+ @article{yang2024cogvideox,
279
+ title={CogVideoX: Text-to-Video Diffusion Models with An Expert Transformer},
280
+ author={Yang, Zhuoyi and Teng, Jiayan and Zheng, Wendi and Ding, Ming and Huang, Shiyu and Xu, Jiazheng and Yang, Yuanming and Hong, Wenyi and Zhang, Xiaohan and Feng, Guanyu and others},
281
+ journal={arXiv preprint arXiv:2408.06072},
282
+ year={2024}
283
+ }
284
+ ```
CogVideoX-Fun-5b-InP/model_index.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "CogVideoXPipeline",
3
+ "_diffusers_version": "0.31.0.dev0",
4
+ "scheduler": [
5
+ "diffusers",
6
+ "CogVideoXDDIMScheduler"
7
+ ],
8
+ "text_encoder": [
9
+ "transformers",
10
+ "T5EncoderModel"
11
+ ],
12
+ "tokenizer": [
13
+ "transformers",
14
+ "T5Tokenizer"
15
+ ],
16
+ "transformer": [
17
+ "diffusers",
18
+ "CogVideoXTransformer3DModel"
19
+ ],
20
+ "vae": [
21
+ "diffusers",
22
+ "AutoencoderKLCogVideoX"
23
+ ]
24
+ }
CogVideoX-Fun-5b-InP/scheduler/scheduler_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "CogVideoXDDIMScheduler",
3
+ "_diffusers_version": "0.31.0.dev0",
4
+ "beta_end": 0.012,
5
+ "beta_schedule": "scaled_linear",
6
+ "beta_start": 0.00085,
7
+ "clip_sample": false,
8
+ "clip_sample_range": 1.0,
9
+ "num_train_timesteps": 1000,
10
+ "prediction_type": "v_prediction",
11
+ "rescale_betas_zero_snr": true,
12
+ "sample_max_value": 1.0,
13
+ "set_alpha_to_one": true,
14
+ "snr_shift_scale": 1.0,
15
+ "steps_offset": 0,
16
+ "timestep_spacing": "trailing",
17
+ "trained_betas": null
18
+ }
CogVideoX-Fun-5b-InP/transformer/config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "CogVideoXTransformer3DModel",
3
+ "_diffusers_version": "0.30.1",
4
+ "activation_fn": "gelu-approximate",
5
+ "attention_bias": true,
6
+ "attention_head_dim": 64,
7
+ "dropout": 0.0,
8
+ "flip_sin_to_cos": true,
9
+ "freq_shift": 0,
10
+ "in_channels": 33,
11
+ "max_text_seq_length": 226,
12
+ "norm_elementwise_affine": true,
13
+ "norm_eps": 1e-05,
14
+ "num_attention_heads": 48,
15
+ "num_layers": 42,
16
+ "out_channels": 16,
17
+ "patch_size": 2,
18
+ "sample_frames": 49,
19
+ "sample_height": 60,
20
+ "sample_width": 90,
21
+ "spatial_interpolation_scale": 1.875,
22
+ "temporal_compression_ratio": 4,
23
+ "temporal_interpolation_scale": 1.0,
24
+ "text_embed_dim": 4096,
25
+ "time_embed_dim": 512,
26
+ "timestep_activation_fn": "silu",
27
+ "use_rotary_positional_embeddings": true
28
+ }
CogVideoX-Fun-5b-InP/transformer/diffusion_pytorch_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cef44ffebb7a915c931021ab48801e2d6c65a6ee10b5682e86b5ad77a6ab2afb
3
+ size 11141100752
CogVideoX-Fun-5b-InP/vae/config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "AutoencoderKLCogVideoX",
3
+ "_diffusers_version": "0.31.0.dev0",
4
+ "act_fn": "silu",
5
+ "block_out_channels": [
6
+ 128,
7
+ 256,
8
+ 256,
9
+ 512
10
+ ],
11
+ "down_block_types": [
12
+ "CogVideoXDownBlock3D",
13
+ "CogVideoXDownBlock3D",
14
+ "CogVideoXDownBlock3D",
15
+ "CogVideoXDownBlock3D"
16
+ ],
17
+ "force_upcast": true,
18
+ "in_channels": 3,
19
+ "latent_channels": 16,
20
+ "latents_mean": null,
21
+ "latents_std": null,
22
+ "layers_per_block": 3,
23
+ "norm_eps": 1e-06,
24
+ "norm_num_groups": 32,
25
+ "out_channels": 3,
26
+ "sample_height": 480,
27
+ "sample_width": 720,
28
+ "scaling_factor": 0.7,
29
+ "shift_factor": null,
30
+ "temporal_compression_ratio": 4,
31
+ "up_block_types": [
32
+ "CogVideoXUpBlock3D",
33
+ "CogVideoXUpBlock3D",
34
+ "CogVideoXUpBlock3D",
35
+ "CogVideoXUpBlock3D"
36
+ ],
37
+ "use_post_quant_conv": false,
38
+ "use_quant_conv": false
39
+ }
CogVideoX-Fun-5b-InP/vae/diffusion_pytorch_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd47d57ad948ff80da0af0cb2e4dcdef65073aba59bccfd383ada9a7d1c02024
3
+ size 431221142