# Repository Briefing: Vchitect/Latte
> Source: https://repoforai.com/repo/Vchitect/Latte (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/Vchitect/Latte
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: B (55/100 · Maintenance 12/35 · Adoption 17/25 · Releases 6/20 · License 20/20)
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: CLI, GPU, Local AI
- **Momentum**: 1,950 ★ total (+0 24h / +0 7d) · 190 forks
- **When to Use**: Best for: Researchers reproducing checkpoint baselines, testing joint video–image training, or integrating local Latte-1 inference into a Python workflow. Skip if: You need a managed generation endpoint, a verified CPU throughput target, or a turnkey text-to-video training recipe.

## Overview
```text
### Architecture & Core Mechanics
Latte is a PyTorch research implementation of a latent diffusion Transformer for video. The Transformer denoises in latent space, and the VAE decodes the result into frames. The source tree separates model definitions (`models/`), diffusion code (`diffusion/`), data handling (`datasets/`), and experiment settings (`configs/`). Sampling lives in `sample/`; the standard PyTorch and Lightning training entry points sit at the repository root.

For application integration, Diffusers 0.30.0 or later can load Latte-1 through `LattePipeline` without using the native training entry points. The example replaces `pipe.vae` with `AutoencoderKLTemporalDecoder` from the same checkpoint's `vae_temporal_decoder` subfolder. That is a concrete component-level integration point; the native research workflow instead exposes launch scripts and YAML experiment configurations.

### Key Capabilities & Differentiators
Latte-1 supports text-to-video and text-to-image through `sample/t2v.sh` and `sample/t2i.sh`. The Diffusers example uses 16 frames for video or one frame for an image; those values are demonstrated settings, not verified limits. The native sampler, `sample/sample.py`, exposes denoising steps and classifier-free guidance scale. Pretrained dataset checkpoints cover FaceForensics, SkyTimelapse, UCF101, and Taichi-HD, and `sample/ffs_ddp.sh` provides a distributed FaceForensics sampling example.

The released training entry points cover class-conditional and unconditional models. `train_with_img.py` adds joint video–image training, and both training paths have Lightning counterparts. The supplied 256×256 FaceForensics configuration is a concrete starting point for reproducing a training run. The text-conditioned checkpoints and inference scripts should not be taken as evidence of an end-to-end text-to-video training recipe. Dataset layout and evaluation procedures are in `docs/datasets_evaluation.md`.

### Trade-offs & Limitations
Latte is most useful when you need control over model sampling, training settings, and dataset-level evaluation. Compared with a hosted video-generation API, it offers direct access to those controls but leaves environment setup, checkpoint management, GPU scheduling, and any serving layer to the adopter. For inference alone, the Diffusers path avoids importing the repository's training workflow. The 256×256 training example is a reproducible starting point, not evidence of output resolution or quality across all checkpoints.

This is a PyTorch video diffusion workload, so size the deployment using the target checkpoint, frame count, resolution, precision, and concurrency rather than a fixed VRAM estimate. Denoising steps also affect runtime. The CPU inference route exists, but the float16 example does not establish compatibility or practical throughput on a given CPU. Apache-2.0 covers repository code; checkpoint and dataset terms need separate review for production use or redistribution.

### Hardware & Deployment Guide
Start locally with Conda and `environment.yml`. Use the Diffusers pipeline for Latte-1 inference or the repository scripts for native sampling. The text-to-video launcher fetches its checkpoints automatically. For a disconnected deployment, stage the necessary dependencies and model components and verify loading without network access. For CPU-only pretrained inference, remove `cudatoolkit` and `pytorch-cuda` from the environment file and check precision compatibility independently of the float16 example.

For multi-GPU experiments, launch `train.py` with `torchrun` and a YAML config such as `configs/ffs/ffs_train.yaml`, or submit `slurm_scripts/ffs.slurm` on a Slurm cluster. The Lightning entry points can detect available GPUs and use distributed training. The project milestones include the PixArt-α-initialized Latte-0 checkpoint in January 2024, Latte-1 in May 2024, and VideoSys support in June 2024. These are checkpoint and integration milestones, not versioned GitHub releases.
```

## Key Capabilities
```text
- Model: A PyTorch latent diffusion Transformer for video, with a temporal VAE decoder option for Latte-1.
- Text inference: Latte-1 supports text-to-video and text-to-image via shell launchers or Diffusers 0.30.0+.
- Sampling controls: `sample/sample.py` exposes denoising steps and classifier-free guidance scale; DDP is available for batch sampling.
- Training modes: `train.py` and `train_with_img.py` support class-conditional and unconditional training, with parallel Lightning entry points.
- Research checkpoints: Pretrained weights cover FaceForensics, SkyTimelapse, UCF101, and Taichi-HD.
- Cluster workflow: YAML configurations drive `torchrun` or Slurm jobs, including a 256×256 FaceForensics training example.
```

## Quick Start / Clone
```bash
git clone https://github.com/Vchitect/Latte
cd Latte
```
