1
0
Fork 0

An app (and template for apps) that use stable diffusion and can be deployed as a XetHub Capsule!

README.md

Stable Diffusion Text To Image Demo

Local Setup Instructions

This app demo app was developed with python 3.9 as the target version, however newer version are likely to work as well. It is recommended to use virtual environment locally.

Here are the quick setup commands (for linux or macOS):

# create and activate virtual environment (called venv)
python -m venv venv
source venv/bin/activate

# install dependencies
pip install -r requirements.txt

Environment Variables and Configuration

In the current version of the app we use OctoML's OctoAI service for image generation. The app expect to find 2 environment variables, either set through the command line e.g. export OCTOAI_TOKEN=<token>, or in a .env file.

Example .env file

OCTOAI_TOKEN=<token>
OCTOAI_PUBLIC_ENDPOINT=<endpoint>

This app also requires XetHub environment variables to support writing back to the project. Make sure to export the following:

XET_USER_NAME=
XET_USER_TOKEN=
XET_USER_EMAIL=
File List Total items: 8
Name Last Commit Size Last Modified
images Write car_photo 9 months ago
.gitattributes Initial commit 79 B 10 months ago
.gitignore load .env 21 B 10 months ago
README.md README updates, small UX updates (#3) 1.5 KiB 10 months ago
app.py Make Gallery not have scrollbars, tested using Capsule (#6) 6.5 KiB 10 months ago
config.py use env vars for login 1019 B 10 months ago
placeholder.png initial UI 369 KiB 10 months ago
requirements.txt pyxet save to repo 1.4 KiB 10 months ago

About

An app (and template for apps) that use stable diffusion and can be deployed as a XetHub Capsule!

Repository Size

Loading repo size...

Commits 72 commits

File Types