replicate/endless-zoom
JavaScript
Captured source
source ↗replicate/endless-zoom
Language: JavaScript
Stars: 25
Forks: 0
Open issues: 1
Created: 2023-11-08T16:42:47Z
Pushed: 2023-11-25T08:25:36Z
Default branch: main
Fork: no
Archived: no
README:
Endless Zoom
The example in public/scripts.js is used to run https://endless-zoom.vercel.app/, a small web toy that allows you to keep zooming in to a generated image and get more and more detail.
This repo is an example of:
p5.js + Latent Consistency Model
This allows p5.js to interact with a Latent Consistency Model, and to easily swap between the backend being a local copy as described in https://replicate.com/blog/run-latent-consistency-model-on-mac, or a model hosted on replicate
Usage
edit public/script.js with your p5.js code and point it to the endpoint of your choice
Local server setup
For local run, install the prototype branch of https://github.com/replicate/latent-consistency-model/tree/prototype
git clone https://github.com/replicate/latent-consistency-model.git cd latent-consistency-model git checkout prototype
Make a python environment using e.g. venv, edm or conda and activate it
Install dependencies
pip install -r requirements.txt
Run serve.py
python serve.py
Replicate server setup
Add your Replicate API token to .env.local:
REPLICATE_API_TOKEN=
All
Install dependencies:
npm install
Run the development server:
npm run dev
Open http://localhost:3000 with your browser.