Practical overview
When it fits
Use it when you want code-level access to a research implementation for training and experimenting with text-guided video generation, rather than a hosted, point-and-click video service.
Who it is for
- Machine-learning researchers exploring text-to-video generation.
- Python developers prototyping prompt-guided video generation with PyTorch.
- Researchers experimenting with C-ViViT training, MaskGit sampling, or an optional token critic.
Documented uses
- Train a C-ViViT component using a folder of images or videos.
- Generate a video clip conditioned on a text prompt.
- Continue a clip by conditioning a new scene on frames from the preceding scene.
- Construct a multi-scene video from a sequence of text descriptions.
Requirements & limits
The repository is public and lists an MIT license. Its README gives `pip install phenaki-pytorch` as the installation command.
- The examples use PyTorch and CUDA; the main model workflow requires model components and, for the shown sampling path, a trained C-ViViT checkpoint.
- The README describes outputs of up to two minutes but cautions that two minutes of coherent video is not achieved in the paper; its scene-by-scene approach reuses prior frames.
- The TokenCritic is optional and described as a potential improvement, not a guaranteed quality increase.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Sample a text-conditioned video with a trained C-ViViT checkpoint
Set up Phenaki with a trained C-ViViT checkpoint and sample a short text-guided video.
Before you start
- The
phenaki-pytorchpackage and PyTorch are installed. - A trained C-ViViT checkpoint is available at a path you can provide.
- CUDA is available for the documented
.cuda()setup.
Steps
Create a
CViViTwith the documented video configuration and load the trained checkpoint withcvivit.load('/path/to/trained/cvivit.pt').Create a
MaskGitmodel and combine it with the C-ViViT inPhenaki, then move the Phenaki model to CUDA.Call
phenaki.sample(texts='a squirrel examines an acorn', num_frames=17, cond_scale=5.)to request a video tensor.For another scene, pass the previous scene's last three frames as
prime_framesto a secondphenaki.samplecall, then concatenate the returned tensors along the frame dimension.
Expected outcome
The example produces a video tensor conditioned on text; chaining samples with prime frames yields concatenated scene segments.
Guide limitations
- The example relies on a trained C-ViViT checkpoint; checkpoint training is a separate documented process.
- The README notes that the paper does not achieve two minutes of coherent video in one continuous scene; longer sequences use scene changes conditioned on previous frames.
- The example shows tensor generation and concatenation, not exporting a playable video file.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 14 October 2026
- Original website title
- lucidrains/phenaki-pytorch · Official homepage title · retained in its source language

