summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormagnus2022-12-16 07:29:42 -0600
committermagnus2022-12-16 07:29:42 -0600
commit2eae45ef0cfd4b4ed8ccaa58a3e9b1f8ea148b46 (patch)
tree59cc04351d364487c6e104a0393d01f53b21b079
downloadaur-2eae45ef0cfd4b4ed8ccaa58a3e9b1f8ea148b46.tar.gz
Alloow installing stable diffusion
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD38
-rw-r--r--stable-diffusion-ui.install20
3 files changed, 72 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..bd4051fe952f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = stable-diffusion-ui
+ pkgdesc = A simple 1-click way to install and use Stable Diffusion on your own computer.
+ pkgver = 2.4.13
+ pkgrel = 1
+ url = https://stable-diffusion-ui.github.io/
+ install = stable-diffusion-ui.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ provides = stable-diffusion-ui
+ source = https://github.com/cmdr2/stable-diffusion-ui/releases/latest/download/stable-diffusion-ui-linux.zip
+ md5sums = SKIP
+
+pkgname = stable-diffusion-ui
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..44643a9d9813
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Magnus Anderson <magnus@iastate.edu>
+pkgname=stable-diffusion-ui
+pkgver=2.4.13
+pkgrel=1
+pkgdesc="A simple 1-click way to install and use Stable Diffusion on your own computer."
+arch=('i686' 'x86_64')
+url='https://stable-diffusion-ui.github.io/'
+source=('https://github.com/cmdr2/stable-diffusion-ui/releases/latest/download/stable-diffusion-ui-linux.zip')
+license=('custom')
+provides=('stable-diffusion-ui')
+makedepends=()
+md5sums=('SKIP')
+install='stable-diffusion-ui.install'
+
+build() {
+ echo Do Androids Dream of Electric Sheep?
+ cat >stable-diffusion-ui-server <<!
+#!/bin/bash
+cd /opt/stable-diffusion-ui
+./start.sh
+!
+}
+
+pkgver() {
+ curl 'https://stable-diffusion-ui.github.io/docs/installation/' |
+ grep 'stable-diffusion-ui-linux.zip' |
+ awk -F \" '{print $2}' |
+ grep -oE '[0-9]+\.[0-9]+\.[0-9]+'
+}
+
+package() {
+ install -Dm644 stable-diffusion-ui/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm755 stable-diffusion-ui-server "$pkgdir/usr/bin/stable-diffusion-ui-server"
+
+ mkdir -p "$pkgdir/opt/"
+ cp -r "stable-diffusion-ui" "$pkgdir/opt/"
+ chmod 777 "$pkgdir/opt/stable-diffusion-ui"
+}
diff --git a/stable-diffusion-ui.install b/stable-diffusion-ui.install
new file mode 100644
index 000000000000..5aceb58c4641
--- /dev/null
+++ b/stable-diffusion-ui.install
@@ -0,0 +1,20 @@
+cecho() {
+ echo -e "\x1b[31m$@\x1b[0m"
+}
+
+post_install() {
+ echo
+ cecho Stable Diffusion UI has been installed as according to https://stable-diffusion-ui.github.io/docs/installation/
+ echo 'The install directory is `/opt/stable-diffusion-ui`'
+ cecho 'To start it, just run `stable-diffusion-ui-server`'
+ echo This will then download around 15GiB the first time you run it. Make sure the same user runs it every time.
+ cecho Enjoy using Stable Diffusion!
+ echo
+}
+post_upgrade() {
+ echo
+ cecho Stable Diffusion UI has been upgraded
+ echo I don\'t know if you need to do this, or what might happen.
+ cecho 'It is probably a good idea to run `stable-diffusion-ui-server` and see what happens'
+ echo
+}