alibaba/Tora
A CogVideoX-based diffusion transformer for trajectory-controlled video generation
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Tora extends a CogVideoX-5B spatiotemporal diffusion transformer with a dedicated motion-conditioning path. The Trajectory Extractor uses a 3D video compression network to encode arbitrary paths as hierarchical spacetime motion patches. The Motion-guidance Fuser feeds those patches into DiT blocks alongside text and, for image-to-video, a reference first frame. The trajectory guides generation inside the model rather than warping an already generated clip.
The sat/ implementation uses PyTorch and the bundled modules/SwissArmyTransformer, with a T5 text encoder, a 3D VAE, and separate Tora checkpoints for text-to-video and image-to-video. sat/sample_video.py is the YAML-driven inference entrypoint, launched through torchrun. The separate diffusers-version/ directory provides a second inference route with corresponding weights; do not assume that SAT commands and checkpoint layouts carry over.
Key Capabilities & Differentiators
Tora exposes trajectory-guided text-to-video and first-frame image-to-video. SAT inference accepts prompt and trajectory files through --input-file and --point_path. In image-to-video mode, --image2video enables image conditioning, --img_dir supplies the source images, and @@ associates each prompt with a first-frame filename. The 256×256 canvas defines path coordinates, not output resolution. The architecture targets varied durations, aspect ratios, and resolutions, but no supported output matrix is established here.
The SAT implementation includes a Gradio demo and a text-to-video training pipeline. train_video.py pairs labels/*.txt with videos/*.mp4 and uses train_dense.yaml followed by train_sparse.yaml. Stage 1 uses a CogVideoX-5B SAT checkpoint. The documented training path is text-to-video; the availability of image-to-video inference weights does not establish an equivalent training workflow.
Trade-offs & Limitations
Compared with prompt-driven CogVideoX, Tora gives shot designers explicit control over the desired motion path. That is valuable when the direction or timing of motion matters, but it adds trajectory preparation, coordinate alignment, and output verification to the workflow. A motion-control project such as DragNUWA is a more relevant comparison when paths are mandatory; there is not enough matched evidence to rank their fidelity or throughput. Sparse prompts can weaken both visual quality and motion adherence, so keep prompt quality consistent when evaluating trajectories.
Diffusers is the better first deployment test for a memory-constrained workstation; SAT is the supplied route for the two-stage text-to-video training workflow. The inference and training VRAM figures are configuration-specific, not concurrent serving capacity estimates. Licensing is a separate decision: the repository is listed as Apache-2.0, but the Tora weights carry CogVideoX_LICENSE terms that must be reviewed before commercial use or redistribution.
Hardware & Deployment Guide
For SAT, use Python 3.10–3.12; the example environment pairs PyTorch 2.4.0 with torchvision 0.19.0 and CUDA 12.1. Install modules/SwissArmyTransformer in editable mode and apply sat/requirements.txt. Download assets from Hugging Face, ModelScope, or direct links and arrange the T5, VAE, and selected task checkpoint under sat/ckpts. Run sample_video.py through torchrun for CLI inference or sat/app.py for the local Gradio demo. Once the assets and dependencies are in place, this is a local GPU path, not a hosted inference API dependency.
For a 16 GB workstation, evaluate Diffusers first: its reported inference footprint is around 5 GiB, versus about 30 GiB for the tested SAT text-to-video run on an A100. SAT text-to-video training was tested at about 60 GiB on an A100. The December 2024 Diffusers update added SageAttention2 and model compilation; the reported A10 speedup of approximately 52% applies to inference steps after the first, not to complete jobs. Image-to-video code and weights followed in January 2025. These milestones are project updates, not tagged GitHub releases.
@@.train_video.py runs a dense-then-sparse text-to-video recipe, with a CogVideoX-5B SAT checkpoint for stage 1.CogVideoX_LICENSE separately from the repository's Apache-2.0 listing.Previsualization, research, and local video prototyping where an explicit motion path is part of the shot specification; trial Diffusers first on a 16 GB GPU.
Prompt-only video is sufficient, you need a turnkey serving stack with predictable concurrency, or you cannot accommodate the checkpoint terms and measured GPU requirements.
Quick Start & Installation
# Clone this repository. git clone https://github.com/alibaba/Tora.git cd Tora # Install Pytorch (we use Pytorch 2.4.0) and torchvision following the official instructions: https://pytorch.org/get-started/previous-versions/. For example: conda create -n tora python==3.10 conda activate tora conda install pytorch==2.4.0 torchvision==0.19.0 pytorch-cuda=12.1 -c pytorch -c nvidia # Install requirements cd modules/SwissArmyTransformer pip install -e . cd ../../sat pip install -r requirements.txt cd ..
Comparison vs. Top Voice, Vision & Video Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| Tora ★ | 1.2k | +1 | Python | Apache-2.0 | A CogVideoX-based diffusion transformer for trajectory-controlled video generati |
| Wan2.1 | 17.6k | +55 | Python | Apache-2.0 | Local video diffusion models for text, image, and keyframe-driven generation |
| whisper | 114.1k | +548 | Python | MIT | Local encoder-decoder Transformer for multilingual speech transcription and tran |
| lingbot-map | 19.5k | +365 | Python | Apache-2.0 | A Geometric Context Transformer for streaming 3D reconstruction from video |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/alibaba/Tora.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about Tora
How do I supply a custom trajectory and starting image?
--point_path and a prompt file through --input-file. Trajectory coordinates are drawn on a 256×256 canvas; that is the control coordinate space, not the output resolution. For image-to-video, add --image2video and --img_dir, and associate each first-frame filename with its prompt using @@.Which inference path should I try on a 16 GB GPU?
Does Apache-2.0 cover commercial self-hosting of the weights?
CogVideoX_LICENSE. Review the terms for the exact checkpoint and companion assets you plan to use, particularly before redistribution or commercial deployment.When should I choose Tora over CogVideoX or a motion-control alternative?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy