https://github.com/replicate/endless-zoom
https://github.com/replicate/endless-zoom
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/replicate/endless-zoom
- Owner: replicate
- Created: 2023-11-08T16:42:47.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-23T17:09:59.000Z (about 2 years ago)
- Last Synced: 2023-11-23T18:25:07.264Z (about 2 years ago)
- Language: JavaScript
- Homepage: https://endless-zoom.vercel.app
- Size: 14.6 MB
- Stars: 17
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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
```console
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
```console
pip install -r requirements.txt
```
Run serve.py
```
python serve.py
```
### Replicate server setup
Add your [Replicate API token](https://replicate.com/account#token) to `.env.local`:
```
REPLICATE_API_TOKEN=
```
### All
Install dependencies:
```console
npm install
```
Run the development server:
```console
npm run dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser.