stable-diffusion - annna - Annna the nice friendly bot. HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/ DIR Log DIR Files DIR Refs DIR Tags DIR README --- stable-diffusion (1137B) --- 1 #!/bin/sh 2 3 if [ $# -lt 2 ]; 4 then 5 printf "usage: %s output.png some funny cat prompt ...\n" \ 6 "$(basename "${0}")" >&2 7 exit 1 8 fi 9 10 sdbase="/br/ai/stable-diffusion.cpp" 11 sdcmd="${sdbase}/build/bin/sd -t 16 --steps 20 -s -1 -H 512 -W 512 --cfg-scale 8.0" 12 sdmodel="${SD_MODEL:-${sdbase}/models/epicphotogasm_x.f16.gguf}" 13 sdnegative='nipples, busty, nude, lowres, (worst quality, low quality, normal quality:2), cropped, infant, blur, haze, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, extra limbs, disfigured, deformed, body out of frame, bad anatomy, watermark, signature, cut off, low contrast, underexposed, overexposed, bad art, beginner, amateur, distorted face, blurry, draft, grainy, nsfw' 14 outputf="${1}" 15 shift 1 16 17 if mountpoint -q /br/ai/tmp; 18 then 19 sdbasename="$(basename "${sdmodel}")" 20 sdtmppath="/br/ai/tmp/${sdbasename}" 21 [ ! -r "${sdtmppath}" ] && cp "${sdmodel}" /br/ai/tmp 22 [ -r "${sttmppath}" ] && sdmodel="${sdtmppath}" 23 fi 24 25 ${sdcmd} --type f16 -m ${sdmodel} -o "${outputf}" -p "$@" -n "${sdnegative}" >/dev/null 2>&1 26 #${sdcmd} -m ${sdmodel} -o "${outputf}" -p "$@" -n "${sdnegative}" -v 27