summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander F. Rødseth2022-09-06 13:20:32 +0200
committerAlexander F. Rødseth2022-09-06 13:20:32 +0200
commiteb2a9ecb59dee9460f6634556ce785863baca850 (patch)
tree5a3f3d5b47f9b244cf75023aa8871eeeadea34fd
downloadaur-eb2a9ecb59dee9460f6634556ce785863baca850.tar.gz
Initial commit
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD26
2 files changed, 48 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..57becee58177
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = stable-diffusion-intel
+ pkgdesc = Stable diffusion using an Intel CPU (includes a txt2img command that takes a prompt)
+ pkgver = 20220906
+ pkgrel = 1
+ url = https://github.com/bes-dev/stable_diffusion.openvino
+ arch = x86_64
+ license = Apache2
+ depends = openvino
+ depends = python-diffusers
+ depends = python-ftfy
+ depends = python-huggingface-hub
+ depends = python-numpy
+ depends = python-opencv
+ depends = python-scipy
+ depends = python-streamlit
+ depends = python-tqdm
+ depends = python-transformers
+ depends = python-watchdog
+ source = git+https://github.com/bes-dev/stable_diffusion.openvino#commit=294dd34234f0629f69d5af5b1190841560242969
+ b2sums = SKIP
+
+pkgname = stable-diffusion-intel
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5017752f8001
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
+
+pkgname=stable-diffusion-intel
+pkgver=20220906
+pkgrel=1
+pkgdesc='Stable diffusion using an Intel CPU (includes a txt2img command that takes a prompt)'
+arch=(x86_64)
+url='https://github.com/bes-dev/stable_diffusion.openvino'
+license=(Apache2)
+depends=(openvino python-diffusers python-ftfy python-huggingface-hub python-numpy python-opencv python-scipy python-streamlit python-tqdm python-transformers python-watchdog)
+source=("git+$url#commit=294dd34234f0629f69d5af5b1190841560242969")
+b2sums=(SKIP)
+
+prepare() {
+ echo -e '#!/bin/sh\nexport PYTHONPATH+=/opt/intel/openvino/python/python3.10\ntime /usr/bin/python3 /opt/stable-diffusion-intel/txt2img --prompt "$@"' > txt2img.sh
+}
+
+package() {
+ install -d "$pkgdir/opt"
+ cp -r stable_diffusion.openvino "$pkgdir/opt/$pkgname"
+ mv "$pkgdir/opt/$pkgname/demo.py" "$pkgdir/opt/$pkgname/txt2img"
+ install -d "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ mv "$pkgdir/opt/$pkgname/LICENSE" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm755 txt2img.sh "$pkgdir/usr/bin/txt2img"
+}