[
画像:So many packages...]
Open-source is a big deal at Replicate.
One of our goals as a team has always been to help unlock the power of machine learning by building flexible and well-designed open-source tools. We’re motivated by the experimentation and innovation that happens when ideas can grow beyond the confines of academic papers and take life as reproducible, open-source code.
This page highlights some of the open-source projects and tools we maintain. For the full list, see the @replicate organization on GitHub.
API client libraries
SDKs for working with Replicate’s HTTP API.
replicate/replicate-javascript -
Node.js client for the Replicate API with ESM and CommonJS support. Works on multiple runtimes like Node.js, Bun, and Deno, and serverless platforms like CloudFlare Workers, Vercel functions, and AWS Lambda.
replicate/replicate-python -
Python client for the Replicate API that lets you run models from your Python code, Jupyter notebooks, and Google Colab.
replicate/replicate-go -
Go client. It lets you run models from your Golang code, and everything else you can do with Replicate's HTTP API.
Building models
The tools we use to define, package, and continuously deploy models on Replicate.
replicate/cog -
Containers for machine learning. Cog provides a Go CLI and Python API for defining and packaging machine learning models in standard, production-ready Docker containers. Every model you run on Replicate is packaged with Cog.
replicate/cog-safe-push -
Safely push new versions of your Cog model by making sure it works and is backwards-compatible with previous versions.
replicate/setup-cog -
A GitHub Action for Cog so you can run, test, and push models as part of your CI/CD pipeline.
andreasjansson/autocog -
Simplify the process of creating Cog models by using GPT-4 to generate predict.py and cog.yaml automatically.
replicate/pget -
High-performance concurrent file downloader built in Go. Useful for parallelized downloads of huge weights files.
replicate/cli -
The official command-line interface for Replicate.
Running models
Open-source tools created and maintained by Replicate staff.
zeke/aimg -
Generate AI images with Replicate and save them to disk.
zeke/ml-ipsum -
Lorem ipsum meets machine learning. False positive rate velit elit prediction aute id. Serving officia excepteur hyperplane.
zeke/yolox -
Use language models to write one-line shell commands.
Boilerplates
Starter projects and templates to help you quickly begin developing apps using Replicate.
replicate/create-replicate -
A Node.js CLI that works with npx to quickly spin up projects for running models with Replicate's API.
replicate/getting-started-nextjs -
Example app that demonstrates how to use Replicate's API with Next.js. Uses Next.js App Router, React Server Components, and illustrates how to use webhooks with Replicate.
Demo apps
Example apps showing common patterns for using Replicate’s API.
replicate/zoo -
Compare image models like SDXL, Stable Diffusion, and DALL-E.
Flux
Tools for working with Flux, the state-of-the-art open-source image generation model from Black Forest Labs.
zeke/flux-fine-tune-action -
GitHub Actions workflow for fine-tuning Flux. Store your training data in a GitHub repo and train a custom version of Flux.