From 11d0c92828ae6218bac4c04272db371b0f47750a Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 8 Jul 2026 18:27:13 +0200 Subject: Add IMGGEN_WIDTH/IMGGEN_HEIGHT default size to .env Bare prompt runs used the downstream 1024x1024 default. Now the wrapper seeds -W/-H from IMGGEN_WIDTH/IMGGEN_HEIGHT in .env when the flags are absent; -W/-H still override. .env.example documents the vars, notes the multiple-of-8 SDXL constraint, and suggests 1280x960 (landscape). Co-Authored-By: Claude Opus 4.8 --- .env.example | 4 ++++ imggen | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index af9e26e..94f2987 100644 --- a/.env.example +++ b/.env.example @@ -3,5 +3,9 @@ IMGGEN_OUT=/path/to/output IMGGEN_CACHE=/path/to/model-cache # IMGGEN_PORT=8765 # IMGGEN_MODEL=sdxl +# Default image size when no -W/-H is passed. Must be multiples of 8 (SDXL constraint). +# 1280x960 = landscape; omit both to fall back to 1024x1024 (square). +# IMGGEN_WIDTH=1280 +# IMGGEN_HEIGHT=960 # IMGGEN_UID=1000 # IMGGEN_GID=100 diff --git a/imggen b/imggen index 3155372..b385712 100755 --- a/imggen +++ b/imggen @@ -65,7 +65,8 @@ esac # --- prompt path --- PROMPT="$1"; shift -MODEL=""; NEG=""; STEPS=""; GUID=""; SEED=""; OUT=""; W=""; H="" +MODEL=""; NEG=""; STEPS=""; GUID=""; SEED=""; OUT="" +W="${IMGGEN_WIDTH:-}"; H="${IMGGEN_HEIGHT:-}" while [ "$#" -gt 0 ]; do case "$1" in -m|--model) MODEL="$2"; shift 2 ;; -- cgit v1.2.3