Introduction
Introduction Statistics Contact Development Disclaimer Help
Add prototype for new diffuser script stable diffusion. - annna - Annna the nic…
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit c8640269562affe26326ce1d4e1d825423248708
parent 611fd89597b63604202c941fca1c54d4f017353a
Author: Annna Robert-Houdin <[email protected]>
Date: Sun, 12 Nov 2023 17:28:28 +0100
Add prototype for new diffuser script stable diffusion.
Diffstat:
A stable-diffusion-diffusers | 33 +++++++++++++++++++++++++++++…
1 file changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/stable-diffusion-diffusers b/stable-diffusion-diffusers
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+sdbin="/br/ai/diffusers/diffusers-sdxl-lcm-lora.py"
+
+if [ $# -lt 1 ];
+then
+ printf "usage: %s :some:emoji:\n" \
+ "$(basename "${0}")" >&2
+ exit 1
+fi
+
+export PATH="$HOME/bin:$PATH"
+
+emojidb="/br/gopher/diffusers"
+emojiuribase="gophers://bitreich.org/I/diffusers"
+
+emojistr="$@"
+emojiprompt="$(printf "%s\n" "${emojistr}" \
+ | sed 's,^::,,; s,::$,,; s|[-,:=/\.]| |g')"
+emojifile="$(printf "%s\n" "${emojiprompt}" \
+ | cut -c -64 \
+ | sed 's, ,-,g').png"
+
+[ -z "${emojiprompt}" ] && exit 1
+
+if [ ! -e "${emojidb}/${emojifile}" ];
+then
+ SD_MODEL="stabilityai/stable-diffusion-xl-base-1.0" \
+ LORA_ID="latent-consistency/lcm-lora-sdxl" \
+ $sdbin "${emojidb}/${emojifile}" "${emojiprompt}"
+fi
+[ $? -eq 0 ] && printf "%s/%s\n" "${emojiuribase}" "${emojifile}"
+
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.