Adding #alcohol-prescription tag. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 57c56bf34710226d64fbe99a9f07be8e0519c670 | |
parent eea3e376d4aca6465997b052660b740bbcea84aa | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Sat, 21 Oct 2023 18:55:39 +0200 | |
Adding #alcohol-prescription tag. | |
Diffstat: | |
M annna-message-common | 6 ++++-- | |
M modules/hashtags/hashtags.txt | 1 + | |
M stable-diffusion | 6 +++--- | |
M stable-diffusion-emoji | 3 ++- | |
4 files changed, 10 insertions(+), 6 deletions(-) | |
--- | |
diff --git a/annna-message-common b/annna-message-common | |
@@ -46,8 +46,10 @@ case "${text}" in | |
doexpand=1 | |
;; | |
*::*::*) | |
- query=${text#**::} query=${query%%::*} | |
- annna-say -s "${server}" -c "${channel}" "$(stable-diffusion-emoji "${… | |
+ { | |
+ query=${text#**::} query=${query%%::*} | |
+ annna-say -s "${server}" -c "${channel}" "$(stable-diffusion-e… | |
+ } & | |
;; | |
*http*://*|*ytdl://*) | |
case "${text}" in | |
diff --git a/modules/hashtags/hashtags.txt b/modules/hashtags/hashtags.txt | |
@@ -434,6 +434,7 @@ | |
#alcohol gophers://bitreich.org/I/memecache/alcohol.jpg | |
#alcohol-bracelet gophers://bitreich.org/I/memecache/alcohol-bracelet.png | |
#alcohol-guide gophers://bitreich.org/9/memecache/alcohol-guide.mp4 | |
+#alcohol-prescription gophers://bitreich.org/I/memecache/alcohol-prescription.… | |
#alcohol-roll gophers://bitreich.org/9/memecache/alcohol-roll.mp4 | |
#alcohol-victim gophers://bitreich.org/I/memecache/alcohol-victim.png | |
#alcoholic-elephant gophers://bitreich.org/9/memecache/alcoholic-elephant.webm | |
diff --git a/stable-diffusion b/stable-diffusion | |
@@ -8,11 +8,11 @@ then | |
fi | |
sdbase="/br/ai/stable-diffusion.cpp" | |
-sdcmd="${sdbase}/build/bin/sd -t 8" | |
-sdmodel="${sdbase}/v2-1_768-nonema-pruned-ggml-model-f16.bin" | |
+sdcmd="${sdbase}/build/bin/sd -t 16 --steps 10 -s -1 -H 256 -W 256" | |
+sdmodel="${SD_MODEL:-${sdbase}/models/v2-1_768-nonema-pruned-ggml-model-f16.bi… | |
outputf="${1}" | |
shift 1 | |
#${sdcmd} -m ${sdmodel} -o "${outputf}" -p "$@" | |
-${sdcmd} -m ${sdmodel} -o "${outputf}" -p "$@" 2>&1 >/dev/null | |
+${sdcmd} -m ${sdmodel} -o "${outputf}" -p "$@" >/dev/null 2>&1 | |
diff --git a/stable-diffusion-emoji b/stable-diffusion-emoji | |
@@ -23,13 +23,14 @@ emojiprompt="$(printf "%s\n" "${emojistr}" \ | |
| sed 's|-| |g' \ | |
| sed 's|\.| |g')" | |
emojifile="$(printf "%s\n" "${emojiprompt}" \ | |
- | cut -c -32 \ | |
+ | cut -c -64 \ | |
| sed 's, ,-,g').png" | |
[ -z "${emojiprompt}" ] && exit 1 | |
if [ ! -e "${emojidb}/${emojifile}" ]; | |
then | |
+ SD_MODEL="/br/ai/stable-diffusion.cpp/models/stable-diffusion-nano-2-1… | |
stable-diffusion "${emojidb}/${emojifile}" "${emojiprompt}" | |
fi | |
[ $? -eq 0 ] && printf "gophers://bitreich.org/9/emoji/%s\n" "${emojifile}" |