ai-worker

command module
v0.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2025 License: MIT Imports: 0 Imported by: 0

README

ai-worker

[!WARNING] The AI network is in it's Beta phase and although it is ready for production it is still under development. Please report any issues you encounter to the Livepeer Discord.

This repository hosts the AI worker and runner for processing inference requests on the Livepeer AI subnet.

Overview

The AI worker repository includes:

  • Runner: The AI runner, a containerized Python application, processes inference requests on Livepeer AI's Pipelines and models, providing a REST API for model interaction.

  • Worker: The AI worker allows the ai-video branch of go-livepeer to interact with the AI runner. It includes golang API bindings, a worker for routing inference requests, and a Docker manager for AI runner containers.

Runner

The AI runner's code is in the runner directory. For more details, see the AI runner README.

Worker

The AI worker's code is in the worker directory. It includes:

  • Golang API Bindings: Generated from the AI runner's OpenAPI spec using make codegen.
  • Worker: Listens for inference requests from the Livepeer AI subnet and routes them to the AI runner.
  • Docker Manager: Manages AI runner containers.

Build

The AI worker and runner are designed to work with the ai-video branch of go-livepeer. You can run both independently for testing. To build the AI worker locally and run examples, follow these steps:

  1. Follow the README instructions in the runner directory to download model checkpoints and build the runner image.
  2. Generate Go bindings for the runner OpenAPI spec with make codegen.
  3. Run any examples in the cmd/examples directory, e.g., go run cmd/examples/text-to-image/main.go <RUNS> <PROMPT>.

Development documentation

For more on developing and debugging the AI runner, see the development documentation.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
examples/image-to-image command
Package main provides a small example on how to run the 'image-to-image' pipeline using the AI worker package.
Package main provides a small example on how to run the 'image-to-image' pipeline using the AI worker package.
examples/image-to-video command
Package main provides a small example on how to run the 'text-to-video' pipeline using the AI worker package.
Package main provides a small example on how to run the 'text-to-video' pipeline using the AI worker package.
examples/text-to-image command
Package main provides a small example on how to run the 'text-to-image' pipeline using the AI worker package.
Package main provides a small example on how to run the 'text-to-image' pipeline using the AI worker package.
Package worker's module provides multipart form data utilities.
Package worker's module provides multipart form data utilities.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL