caT text to video 2.3b

提供商motexture
分类text-to-video
许可证apache-2.0
下载量20
星标0

简介

caT text-to-video 2.3b 是一款轻量级的文本生成视频模型,由 motexture 提供并采用 Apache-2.0 开源协议。不同于动辄数十亿参数的巨型模型,它在 2.3B 的参数规模下实现了较好的生成效率,适合开发者在资源有限的环境下进行快速部署或微调。该模型旨在将文字描述转化为动态视频,在短视频素材生成、简单动画演示等场景下具有实用价值。对于习惯使用 Stable Video Diffusion 或 Runway 的用户来说,caT 提供了一个更灵活、门槛更低的本地化尝试方案。

核心亮点

  • 2.3B 轻量级参数,对硬件显存要求较低
  • Apache-2.0 协议,支持商业化自由部署
  • 快速将文本转化为短视频,适合快速原型开发
  • 适合作为视频生成管线中的基础轻量化模块

使用方法

安装依赖
# 安装 Hugging Face transformers
pip install transformers torch
SDK 使用
# 使用 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 目录为例)

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
huggingface-cli download motexture/caT-text-to-video-2.3b config.json --local-dir ./dir

更多命令行下载选项,可参见官方文档

SDK 下载

SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('motexture/caT-text-to-video-2.3b')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://huggingface.co/motexture/caT-text-to-video-2.3b

如果您希望跳过 lfs 大文件下载,可以使用如下命令

跳过 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

安装 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')

完整文档

来源: HuggingFace

---
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

bash
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.py

Visit 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