链载Ai

标题: 全网首发:智谱「Sora」此刻开源,单卡可跑可调,附训练细节 [打印本页]

作者: 链载Ai    时间: 2025-12-2 10:56
标题: 全网首发:智谱「Sora」此刻开源,单卡可跑可调,附训练细节

长话短说


智谱的 CogVideoX,也就是「清影」同源模型,在本文发出时,开源了
模型已上 Github、Hugging Face
模型A6000 单卡可跑可调
生成分辨率 720 * 480,6秒, 48帧
训练数据来自互联网,B 站也提供了数据支持

*注1:推理均 21.6G,峰 36G,微调稳定 46.2G,在 A6000 范围内

*注2:坐等推理优化到峰值 24G 以内,就可以 4090 单卡跑了


本次开源:CogVideoX-2B

HF:huggingface.co/THUDM/CogVideoX-2b


Git:github.com/THUDM/CogVideo


本文后附:独家技术详解,含细节披露
顺道爆料:很快还有更大模型,会开源



短话长说



这几天在智谱玩得很开心:



一些效果


提示词:A detailed wooden toy ship with intricately carved masts and sails is seen gliding smoothly over a plush, blue carpet that mimics the waves of the sea. The ship's hull is painted a rich brown, with tiny windows. The carpet, soft and textured, provides a perfect backdrop, resembling an oceanic expanse. Surrounding the ship are various other toys and children's items, hinting at a playful environment. The scene captures the innocence and imagination of childhood, with the toy ship's journey symbolizing endless adventures in a whimsical, indoor setting.


提示词:The camera follows behind a white vintage SUV with a black roof rack as it speeds up a steep dirt road surrounded by pine trees on a steep mountain slope, dust kicks up from it’s tires, the sunlight shines on the SUV as it speeds along the dirt road, casting a warm glow over the scene. The dirt road curves gently into the distance, with no other cars or vehicles in sight. The trees on either side of the road are redwoods, with patches of greenery scattered throughout. The car is seen from the rear following the curve with ease, making it seem as if it is on a rugged drive through the rugged terrain. The dirt road itself is surrounded by steep hills and mountains, with a clear blue sky above with wispy clouds.


提示词:In the haunting backdrop of a war-torn city, where ruins and crumbled walls tell a story of devastation, a poignant close-up frames a young girl. Her face is smudged with ash, a silent testament to the chaos around her. Her eyes glistening with a mix of sorrow and resilience, capturing the raw emotion of a world that has lost its innocence to the ravages of conflict.


提示词:A single butterfly with wings that resemble stained glass flutters through a field of flowers. The shot captures the light as it passes through the delicate wings, creating a vibrant, colorful display. HD.


提示词:A snowy forest landscape with a dirt road running through it. The road is flanked by trees covered in snow, and the ground is also covered in snow. The sun is shining, creating a bright and serene atmosphere. The road appears to be empty, and there are no people or animals visible in the video. The style of the video is a natural landscape shot, with a focus on the beauty of the snowy forest and the peacefulness of the road.


提示词:Extreme close-up of chicken and green pepper kebabs grilling on a barbeque with flames. Shallow focus and light smoke. vivid colours




以下,是来自「赛博禅心」的独家信息

技术概览

大概的架构



更具体来说...

关于架构


3D VAE
视频数据包含很多信息,所以需要很大的存储空间和计算能力。为了解决这个问题,3D VAE 的结构被用到,具体包含三个部分:
落地的时候,为了解决大分辨率泛化、增加帧数带来的困难,模型被分为两个阶段进行预训练(训练结束后,图像上还存在水印等信息),然后通过上下文并行在更高帧率上进行微调(画面更精细,且无水印)。

专家 Transformer
使用专家 Transformer,通过以下流程,实现文字和视频的同时处理,并生成视频:



关于数据


训练数据来自互联网上的数万小时的视频,涵盖Vlog、动画片、纪录片等多种类型。经过场景检测工具处理,长视频被分割为单镜头片段,保留了部分包含场景转换的片段。随后,这些片段被进行筛选和重新描述。

视频筛选
适合作为训练数据的视频,应该是真实世界的纪录片:动态连贯、自然。然而,大部分的视频并不达标。原因主要有二:
于是,对于视频数据,需依据以下特征进行清洗:
最后,2 万个视频样本被进行标注,并基于 video-llama 训练了多个过滤器,用于自动筛选低质量视频。此外,还有个模型会对这些视频进行的光流和美学的打分,进行进一步筛选,以确保生成视频的流畅性和美感。

视频标注
大多数几乎所有视频,都缺少准确的画面描述。所以,智谱的小伙伴训练了一个视频理解模型,用来生成对应的描述。
具体步骤如下:
通过在 10 万个视频上进行训练,使用 16*8 的 A100 集群,训练 10 个 epochs,最终实现了大量视频描述生成。



关于训练


训练方法
在之前的视频训练中,会联合训练图像和固定帧视频,这也带来了两个问题:
为了解决这些问题,这次的模型选择了混合时长训练,并将不同长度的视频放入同一批次,以确保每批次内的形状一致,这种方法被称为帧包。
注:图片可被视作单帧的视频

训练过程
CogVideoX 的训练过程分为三个阶段:低分辨率训练(预训练)、高分辨率训练(预训练),高质量视频微调(最终微调)。
1. 低分辨率训练
在训练初期,模型会在较低分辨率下进行训练。这样可以使模型快速学习基本的图像和视频特征,减少计算资源的消耗。
2. 高分辨率训练
随着训练的深入,模型会逐渐在更高分辨率下进行训练。这一步骤能够帮助模型捕捉更细致的图像和视频细节,提升生成效果。
3. 高质量视频微调
在最终阶段,模型会使用一部分高质量的视频数据进行微调。这个过程能够进一步提升生成视频的视觉质量,并去除生成视频中的瑕疵,如字幕和水印。



关于评估


为了高效、准确地验证 CogVideoX 的效果,评估被分为两块:自动评估和人工评估。
1. 自动评估:通过动作、场景、动态度、多对象和外观风格等,交由 AI 进行评估生成视频的质量。
2. 人工评估:除了自动化评估,研究团队还设计了一百组提示词,将生成的视频进行人工评估。






欢迎光临 链载Ai (http://www.lianzai.com/) Powered by Discuz! X3.5