diff options
| author | Danilo M. <danix@danix.xyz> | 2026-07-08 18:13:44 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-07-08 18:13:44 +0200 |
| commit | 7d352acf2fe68945b85579a98debacbfffd84a3b (patch) | |
| tree | 73a96497f312dd285f29ae21120776aeec43911f | |
| parent | ad826ba3c9987be9eea514c5533c5fb57c943259 (diff) | |
| download | imggen-7d352acf2fe68945b85579a98debacbfffd84a3b.tar.gz imggen-7d352acf2fe68945b85579a98debacbfffd84a3b.zip | |
Use resident daemon model on bare prompt run
Daemon-up prompt run with no -m flag showed the interactive model menu
defaulting to sdxl, which then swapped away the model the user loaded at
'imggen start'. Now a bare run adopts the resident model (queried from
/status); -m KEY remains the explicit override that swaps. Menu removed as
redundant.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| -rwxr-xr-x | imggen | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -81,12 +81,9 @@ while [ "$#" -gt 0 ]; do done if daemon_up; then - # Interactive menu only when no -m and a TTY is present. - if [ -z "$MODEL" ] && [ -t 0 ] && [ -t 1 ]; then - echo "which model? 1) sdxl 2) realvis 3) pony" >&2 - read -rp "choice [1]: " choice || choice=1 - case "$choice" in 2) MODEL=realvis ;; 3) MODEL=pony ;; *) MODEL=sdxl ;; esac - fi + # No -m: use the resident model as-is (no menu, no swap). The user already + # chose it at 'imggen start'; -m KEY is the explicit override that swaps. + MODEL="${MODEL:-$(curl -s "${BASE}/status" | sed -n 's/.*"model": *"\([^"]*\)".*/\1/p')}" MODEL="${MODEL:-sdxl}" OUT_NAME="${OUT:-${MODEL}-$(date +%Y%m%d-%H%M%S).png}" OUT_PATH="${OUT_DIR}/${OUT_NAME}" |
