diff options
| -rw-r--r-- | CLAUDE.md | 4 | ||||
| -rw-r--r-- | README.md | 18 |
2 files changed, 16 insertions, 6 deletions
@@ -74,7 +74,9 @@ keep the old Dockerfile in git to revert. - Real host paths live in the gitignored `.env` (copy `.env.example` to create it), NOT in hardcoded wrapper defaults. `.env` sets `IMGGEN_OUT` → `/out` and `IMGGEN_CACHE` → `/models` (bind mounts), plus optionally `IMGGEN_PORT` (daemon port, default 8765, localhost-only), - `IMGGEN_MODEL` (default sdxl), `IMGGEN_UID`/`IMGGEN_GID`. `HF_HOME=/models` so the ~7.5GB + `IMGGEN_MODEL` (default sdxl), `IMGGEN_WIDTH`/`IMGGEN_HEIGHT` (default image size the wrapper + seeds into `-W`/`-H` when absent; must be multiples of 8; example `.env` is 1280x960 landscape, + unset falls back to 1024x1024), `IMGGEN_UID`/`IMGGEN_GID`. `HF_HOME=/models` so the ~7.5GB weights download once. Output paths in `generate.py`/`server.py` are all under `/out`. - Daemon args (`generate` endpoint) and one-shot CLI args (`generate.py` argparse) are kept in sync by hand in the wrapper; adding a flag means updating `generate.py`, `server.py`, and the @@ -84,6 +84,8 @@ IMGGEN_OUT=/path/to/output # where PNGs land IMGGEN_CACHE=/path/to/model-cache # where the ~7.5GB weights are cached IMGGEN_PORT=8765 # daemon port, localhost-only IMGGEN_MODEL=sdxl # model loaded on `imggen start` +IMGGEN_WIDTH=1280 # default image width (multiple of 8) +IMGGEN_HEIGHT=960 # default image height (multiple of 8) IMGGEN_UID=1000 # your host uid (id -u) IMGGEN_GID=100 # your host gid (id -g) ``` @@ -139,15 +141,21 @@ imggen "a foggy harbour at dawn" --steps 30 --seed 42 imggen "portrait of a fox" -m realvis -o fox.png -n "blurry, low quality" ``` -- If the daemon is UP, the prompt goes to it. If the requested `-m` differs - from the resident model, the daemon swaps first (a few seconds). With no - `-m` and an interactive terminal, a menu picks the model. A failed swap - (bad repo, gated repo, OOM) prints the daemon's error and the wrapper - exits 1. +- If the daemon is UP, the prompt goes to it. With no `-m`, it uses the + currently resident model as-is (the one you chose at `imggen start`), so + repeated prompts just iterate on it. Pass `-m KEY` to override; if that + differs from the resident model the daemon swaps first (a few seconds). A + failed swap (bad repo, gated repo, OOM) prints the daemon's error and the + wrapper exits 1. - If the daemon is DOWN, the wrapper falls back to a one-shot run: it loads the model, generates, and exits. Slower (pays the ~45s load every time) but requires no daemon management. +Size defaults to `IMGGEN_WIDTH`x`IMGGEN_HEIGHT` from `.env` (1280x960 landscape +in the example), falling back to 1024x1024 if unset. Override per run with +`-W`/`-H`. Both must be multiples of 8 (SDXL constraint); the daemon and the +one-shot path reject non-multiples. + Output lands in `$IMGGEN_OUT` (from `.env`). Models cache in `$IMGGEN_CACHE` so the ~7.5GB download happens once. |
