Skip to content

zeke/replicate-prediction-to-video

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

output

This is a command-line tool that uses the Replicate API to create videos from the outputs of image generation models.

How it works

  1. Run the CLI with a model name and a text prompt.
  2. The replicate-python client runs a prediction on the given model using the Replicate API.
  3. The individual images output by the model are save to a temporary directory
  4. FFmpeg is used to produce an MP4 and GIF from the output images.

Usage

Install the dependencies

pip install -r requirements.txt

Get an API key from replicate.com/api and store it in a .env file:

echo "REPLICATE_API_KEY=XXXXXX" > .env

Create videos!

$ python prediction-to-video.py --model laion-ai/erlich --prompt "a logo of a white cat curled up into a ball, sleeping on a blue rug"

See replicate.com/collections/text-to-image for a collection of models that generate images from text prompts.

About

Create a video file from a series of Replicate model output images

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages