- Sidebar with Generate and Gallery icons
- Chat-style generate interface with prompt history
- Images tile in rows as they generate
- Spinner while generating
- Steps input (default 20)
- Mobile responsive
- Lightbox for all images
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Mobile-friendly responsive grid
- GLightbox for lightbox functionality (CDN)
- Served at root (/) endpoint
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
TOML sections capture all subsequent keys until the next section.
default_remote was being written after [remotes] section, making
it appear as part of remotes dict instead of top-level config.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Ensures HSA_OVERRIDE_GFX_VERSION and other env vars are passed
to sd-server subprocess for ROCm GPU compatibility.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
sd-server doesn't have a /health endpoint - it returns 404.
The root endpoint (/) returns 200 with "Stable Diffusion Server is running".
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create tensors/client.py with TsrClient HTTP wrapper for all server APIs
- Add remote server configuration to config.py (get_remotes, resolve_remote, save_remote, set_default_remote)
- Add images command group: list, show, delete, download
- Add models command group: list, active, switch, loras
- Add remote command group: list, add, default
- Update generate command with --remote support
- Update dl command with --remote support
- Update status command with --remote support
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive server API for remote operations:
Step 3.1 - Gallery endpoints:
- GET /api/images - List images (paginated, newest first)
- GET /api/images/{id} - Get image file
- GET /api/images/{id}/meta - Get generation metadata
- POST /api/images/{id}/edit - Update metadata (tags, notes)
- DELETE /api/images/{id} - Delete image + sidecar
- Gallery module with image management and sidecar JSON support
Step 3.2 - Model management:
- GET /api/models - List available checkpoints
- GET /api/models/active - Current loaded model info
- POST /api/models/switch - Switch model (hot reload)
- GET /api/models/loras - List available LoRAs
- GET /api/models/scan - Scan all model directories
Step 3.3 - Download proxy:
- POST /api/download - Start background download from CivitAI
- GET /api/download/status/{id} - Check download progress
- GET /api/download/active - List active downloads
- Auto-scan and link files after download
Step 3.4 - Enhanced generation:
- POST /api/generate - Generate with gallery integration
- Saves images to gallery with metadata sidecar
- Supports all sd-server params
- GET /api/samplers, /api/schedulers - List options
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add database REST API endpoints to FastAPI server:
- GET /api/db/files - List local files with CivitAI info
- GET /api/db/files/{id} - Get file by ID
- GET /api/db/models - Search cached models
- GET /api/db/models/{civitai_id} - Get model by CivitAI ID
- GET /api/db/triggers - Get triggers by file path
- GET /api/db/triggers/{version_id} - Get triggers by version ID
- GET /api/db/stats - Database statistics
- POST /api/db/scan - Scan directory for safetensors
- POST /api/db/link - Link unlinked files to CivitAI
- POST /api/db/cache - Fetch and cache CivitAI model data
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add database management commands to CLI:
- tsr db scan <directory> - Scan safetensors, compute hashes, store metadata
- tsr db link - Match unlinked files to CivitAI by hash lookup
- tsr db cache <model_id> - Fetch and cache full CivitAI model data
- tsr db list - List local files with CivitAI info
- tsr db search - Search cached models offline
- tsr db triggers <file> - Show trigger words for a LoRA
- tsr db stats - Show database statistics
Update API functions to accept optional console for quiet/batch operations.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Create database infrastructure for local model file tracking and CivitAI cache:
- schema.sql: Full schema with local_files, CivitAI cache tables, and views
- db.py: Database class with CRUD operations for file scanning, CivitAI linking,
model caching, search, and trigger word retrieval
- Update compute_sha256 to support optional console for silent batch operations
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Only ConnectError was caught, so once the port opened but the model
was still loading, health check timeouts (ReadTimeout) and connection
resets (ReadError) would crash the polling loop instead of retrying.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace management endpoints (/start, /stop, /restart) with a transparent
reverse proxy and hot-reload architecture. The wrapper now sits in front of
sd-server, forwarding all requests and adding a /reload endpoint for model
swapping without restarting the wrapper itself.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>