OpenViSTAI · Agents · Blockchain · Crypto
Menu
Image & Video AI

Phenaki Pytorch

Phenaki Pytorch is an MIT-licensed Python implementation of Phenaki Video that combines C-ViViT video representation with MaskGit text-conditioned generation. Its code examples cover training on images or videos, sampling prompt-guided clips, and extending a clip with new text-conditioned scenes.

Independent OpenViST project profile, based on linked sources.

Phenaki Pytorch — OpenViST project profile in Image & Video AI.
OpenViST project illustration. See the linked sources for product details.
Understand the project

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.
Before you choose

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.

Source-based practical guide

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

  1. Create a CViViT with the documented video configuration and load the trained checkpoint with cvivit.load('/path/to/trained/cvivit.pt').

  2. Create a MaskGit model and combine it with the C-ViViT in Phenaki, then move the Phenaki model to CUDA.

  3. Call phenaki.sample(texts='a squirrel examines an acorn', num_frames=17, cond_scale=5.) to request a video tensor.

  4. For another scene, pass the previous scene's last three frames as prime_frames to a second phenaki.sample call, 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.
Evidence and transparency

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