Introduction
Introduction Statistics Contact Development Disclaimer Help
stable-diffusion-emoji - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
stable-diffusion-emoji (1200B)
---
1 #!/bin/sh
2
3 if [ $# -lt 1 ];
4 then
5 printf "usage: %s :some:emoji:\n" \
6 "$(basename "${0}")" >&2
7 exit 1
8 fi
9
10 export PATH="$HOME/bin:$PATH"
11
12 emojidb="/br/gopher/emoji"
13 emojiuribase="gophers://bitreich.org/I/emoji"
14
15 emojistr="$@"
16 emojiprompt="$(printf "%s\n" "${emojistr}" \
17 | sed 's,^::,,; s,::$,,; s|[-,:=/\.]| |g')"
18 case "${emojiprompt}" in
19 *beautify*)
20 emojiprompt="$(stable-diffusion-beautify-prompt "${emojiprompt}"…
21 ;;
22 *picassofy*)
23 emojiprompt="Beautiful Retro Collage Painting ${emojiprompt} by …
24 ;;
25 esac
26
27 emojifilebase="$(printf "%s\n" "${emojiprompt}" \
28 | cut -c -64 \
29 | sed "s,',-,g" \
30 | sed "s,?,-,g" \
31 | sed 's, ,-,g')"
32 emojifile="${emojifilebase}.png"
33 emojiorig="${emojifilebase}.orig"
34
35 [ -z "${emojiprompt}" ] && exit 1
36
37 if [ ! -e "${emojidb}/${emojifile}" ];
38 then
39 SD_MODEL="/br/ai/stable-diffusion.cpp/models/epicphotogasm_x.f16…
40 stable-diffusion "${emojidb}/${emojifile}" "${emojiprompt}"
41 if [ -e "${emojidb}/${emojifile}" ];
42 then
43 printf "%s\n" "${emojiprompt}" >> "${emojidb}/${emojiori…
44 fi
45 fi
46 if [ -e "${emojidb}/${emojifile}" ];
47 then
48 printf "%s/%s\n" "${emojiuribase}" "${emojifile}"
49 fi
50
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.