From d8a2a102e48afceb167d2a902fe475070990d894 Mon Sep 17 00:00:00 2001 From: moosecrap Date: Fri, 24 Jul 2026 23:31:47 -0700 Subject: [PATCH] Readme --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dc4995c..7adf1d0 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,20 @@ pip install uvicorn starlette Pillow ## Configuration (`config.py`) You can tune the server's behavior in `config.py`: + +### Server & Logging +- **`HOST` / `PORT`**: The network address and port the server binds to. +- **`LOG_LEVEL`**: Logging verbosity (`DEBUG`, `INFO`, `WARNING`, `ERROR`). +- **`LOG_FILE`**: Path to the server log file. +- **`USER_AGENT`**: The User-Agent string used for API requests (e.g., Wikipedia). Use a browser-like string to avoid 403 Forbidden errors. + +### Model & Token Tuning - **`PATCH_SIZE`**: Set this to `(clip.vision.patch_size * n_merge)` for your specific model to ensure token-perfect resizing. - **`PREVIEW_TOKEN_BUDGET`**: Controls how many tokens the `preview_image` tool aims for (default: 70). -- **`CONTACT_SHEET_COLS/ROWS`**: Adjust the grid size to fit within your model's maximum context window. +- **`CONTACT_SHEET_COLS` / `ROWS`**: Adjust the grid size to fit within your model's maximum context window. +- **`CONTACT_SHEET_THUMB_SIZE`**: The pixel size of thumbnails in the contact sheet. + +### Image & Font Settings - **`IMAGE_QUALITY`**: Adjust JPEG compression (1-100). +- **`SYSTEM_FONT_NAMES`**: A list of font names Pillow should attempt to find in the system path. +- **`FALLBACK_FONT_PATHS`**: Absolute paths to `.ttf` files used if no system fonts are found.