From 7d352acf2fe68945b85579a98debacbfffd84a3b Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 8 Jul 2026 18:13:44 +0200 Subject: 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 --- imggen | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/imggen b/imggen index c5689d4..3155372 100755 --- a/imggen +++ b/imggen @@ -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}" -- cgit v1.2.3