Phase 4: Configuration (config.py)

Add ComfyUI configuration functions:
- `get_comfyui_url()` - URL resolution (env var -> config -> default)
- `get_comfyui_defaults()` - Default generation parameters from config

Config section in config.toml:
    [comfyui]
    url = "http://127.0.0.1:8188"
    default_model = "flux1-dev-fp8.safetensors"
    width = 1024
    height = 1024
    steps = 20
    cfg = 7.0
    sampler = "euler"
    scheduler = "normal"

Updated comfyui.py to use config functions instead of hardcoded values.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Adam Ladachowski
2026-02-16 16:20:25 +01:00
parent 484c52faf3
commit 87ec0bef6a
3 changed files with 105 additions and 10 deletions
+5 -4
View File
@@ -40,11 +40,12 @@
- [x] Step 3.3: Register router in server/__init__.py (with API key auth)
## Phase 4: Configuration (`tensors/config.py`)
- [ ] Step 4.1: Add ComfyUI config functions
- `get_comfyui_url()` - Get ComfyUI backend URL
- `get_comfyui_defaults()` - Get default generation settings
- [x] Step 4.1: Add ComfyUI config functions
- `get_comfyui_url()` - Get ComfyUI backend URL (COMFYUI_URL env -> config -> default)
- `get_comfyui_defaults()` - Get default generation settings from config
- Environment variable: `COMFYUI_URL`
- Config section: `[comfyui]`
- Config section: `[comfyui]` with url, default_model, width, height, steps, cfg, sampler, scheduler
- Updated `comfyui.py` to use config functions
---