From b684f25f3b4e3da67a8b0ad53687dcd68c02dbcc Mon Sep 17 00:00:00 2001 From: Jake Teton-Landis Date: Sun, 15 Jan 2023 22:12:01 -0800 Subject: [PATCH] update README instructions --- Makefile | 8 +++++++- README.md | 33 ++++++++++++++++++++++----------- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 51dfe3c..25fe3a1 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ SPACE:=$(subst ,, ) COMMA:=, MODEL_SPARSE_CHECKOUT_PATTERN=$(subst $(SPACE),$(COMMA),$(MODEL_SPARSE_CHECKOUT_PATTERNS)) -.PHONY: dev download zips aars clean clean-all +.PHONY: dev download zips aars clean clean-all serve uninstall-models dev: download ApplicationSupport download: compiled-models/sd1.4 compiled-models/sd1.5 compiled-models/sd2 @@ -91,3 +91,9 @@ compiled-models/%.00: compiled-models/% ApplicationSupport: ln -s $(HOME)/Library/Application\ Support/tl.jake.Gauss/ $@ + +serve: aars + cd compiled-models && python -m http.server 8080 + +uninstall-models: ApplicationSupport + rm -rf ./ApplicationSupport/models diff --git a/README.md b/README.md index e3ad8b0..4da04f4 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,20 @@ A Stable Diffusion app for macOS built with SwiftUI and Apple's [ml-stable-diffu ## Usage -- Write prompt text and adjust parameters in the composer view at the bottom. +- Gauss is document-based. To get started, create a new document. + - All the images you generate are stored locally inside your `.gaussnb` (Gauss Notebook) files. + - If it's your first time using Gauss, you'll need to install Stable Diffusion models to start generating images. Each model is about 2.5gb. +- Write prompt text and adjust parameters in the composer view at the bottom of the document window. - To export an image, just drag it to Finder or any other image editor. - You can always generate more images from an existing prompt. ## Project Status -**This software is under development and is pre-alpha quality; there is no release for end-users yet.** If you'd like to contribute, you can build the project by following the instructions for developers below. +**This software is under development and is alpha quality.** If you'd like to contribute, you can build the project by following the instructions for developers below. -See [DiffusionBee](https://github.com/divamgupta/diffusionbee-stable-diffusion-ui) for a Stable Diffusion UI built with Electron & Python, but that works out of the box today. +Alternatives: + +- [DiffusionBee](https://github.com/divamgupta/diffusionbee-stable-diffusion-ui) is a Stable Diffusion UI built with Electron & Python. It's probably slower than Gauss but has many more features. ## System requirements @@ -33,21 +38,27 @@ See [DiffusionBee](https://github.com/divamgupta/diffusionbee-stable-diffusion-u - At least 10gb of free disk space. - Recommended: [set up Xcode to format code when you save](https://luisramos.dev/xcode-format-and-save). -### Building from source +### Building Gauss 1. Clone this repo: `git clone https://github.com/justjake/Gauss` -1. Inside the repo, run `make`. This will download pre-build models from HuggingFace into `./compiled-models`. You can run `make -j 3` to download the models in parallel if you have a fast connetion. Eg: `cd Gauss && make` 1. Open the project file (Gauss.xcodeproj) with Xcode: `open Gauss.xcodeproj` -1. You should be able to build (Cmd-B) and run the project. +1. You should be able to run (Cmd-R) the project. + +As with end-users, the first time you run Gauss you'll need to download models. -### Packing zip files for release +### Adding or updating models -The current plan for releasing Gauss is to pack the models it needs into zips, split the zips into parts no larger than 2gb, and then publish everything via Github release. 2gb is the [file size limit for Github releases](https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases#:~:text=Each%20file%20included%20in%20a,a%20release%2C%20nor%20bandwidth%20usage.). +To release model data, we pack the models into archive files, split the archive files into parts no larger than 2gb, and then publish everything via Github release. 2gb is the [file size limit for Github releases](https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases#:~:text=Each%20file%20included%20in%20a,a%20release%2C%20nor%20bandwidth%20usage.). -We'll teach Gauss itself how to find, download, and re-assemble the zip files from Github directly. +We use Apple Archive (.aar) format instead of something common like Zip because .aar unpacking is available from built-in libraries, and zip is not. -To create the zip files: `make zips` +1. To create the `.aar` files: `make aars` +1. Serve the newly-built .aar files locally: `make serve` +1. Switch to installing models locally: +1. Run the project in Xcode, then open the Models window (Window > Models). +1. Open the "Advanced" dropdown and choose "Custom Host" +1. Remove existing model files: `make uninstall-models` ### Publishing releases to Github -TODO - figure this out! +This is done manually.