caT text to video 2.3b
简介
核心亮点
- 2.3B 轻量级参数,对硬件显存要求较低
- Apache-2.0 协议,支持商业化自由部署
- 快速将文本转化为短视频,适合快速原型开发
- 适合作为视频生成管线中的基础轻量化模块
使用方法
# 安装 Hugging Face transformers
pip install transformers torch
# 使用 transformers 加载模型
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("motexture/caT-text-to-video-2.3b")
tokenizer = AutoTokenizer.from_pretrained("motexture/caT-text-to-video-2.3b")
Hugging Face 下载
我们推荐使用命令行或者 Hugging Face Hub SDK 来进行模型的下载。
操作指引:在下载前,请先通过如下命令安装 huggingface_hub:
pip install -U huggingface_hub
命令行下载
下载完整模型库
huggingface-cli download motexture/caT-text-to-video-2.3b
下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
huggingface-cli download motexture/caT-text-to-video-2.3b config.json --local-dir ./dir
SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('motexture/caT-text-to-video-2.3b')
Git 下载
请确保 lfs 已经被正确安装
git lfs install
git clone https://huggingface.co/motexture/caT-text-to-video-2.3b
如果您希望跳过 lfs 大文件下载,可以使用如下命令
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/motexture/caT-text-to-video-2.3b
模型文件托管在 Hugging Face Hub,使用 HF CLI / SDK / Git 直接下载,不经过本站。
PyTorch / Transformers 使用
安装 Transformers
pip install -U transformers torch
模型加载和推理
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('motexture/caT-text-to-video-2.3b')
tokenizer = AutoTokenizer.from_pretrained('motexture/caT-text-to-video-2.3b')
完整文档
---
license: apache-2.0
datasets:
- TempoFunk/webvid-10M
language:
- en
tags:
- text-to-video
base_model:
- ali-vilab/text-to-video-ms-1.7b
---
caT text to video
Conditionally augmented text-to-video model. Uses pre-trained weights from modelscope text-to-video model, augmented with temporal conditioning transformers to extend generated clips and create a smooth transition between them.
Supports prompt interpolation as well to change scenes during clip extensions.
The model was trained on two RTX 6000 Ada GPUs for 5 million steps using the WebWid 10M dataset, with a batch size of 1 and a learning rate of 1e-6 at a resolution of 320x320. It used 8 frames for conditioning and 8 frames for noisy samples, with a stride of 6.
Installation
Clone the Repository
git clone https://github.com/motexture/caT-text-to-video-2.3b/
cd caT-text-to-video-2.3b
python3 -m venv venv
source venv/bin/activate # On Windows use venv\Scripts\activate
pip install -r requirements.txt
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
python run.pyVisit the provided URL in your browser to interact with the interface and start generating videos.
Examples:
<video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/64a86f7d03835e13f95c3687/OPFi_f4bp2WuCDSYodHJE.mp4"></video>
A guy is riding a bike -> A guy is riding a motorcycle
<video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/64a86f7d03835e13f95c3687/U0Jx7U-Oo4lBgFJoB7E0v.mp4"></video>
Will Smith is eating a hamburger -> Will Smith is eating an ice cream
<video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/64a86f7d03835e13f95c3687/hZprbX6TTpJxWyMDMJIrl.mp4"></video>
A lion is looking around -> A lion is running
<video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/64a86f7d03835e13f95c3687/FrGfwcXRU7FyM9aMAyu3x.mp4"></video>
Darth Vader is surfing on the ocean
<video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/64a86f7d03835e13f95c3687/VoUg8tnsZqnn1QsXz93Xh.mp4"></video>
A beautiful anime girl with pink hair -> Anime girl laughing