# cAIc — Task List (v1.0+) Previous task history archived at `docs/archive/TASKS-pre-1.0.md`. --- ## TASK 1 — Image Generation Service (corsair) **Goal:** Add image generation as a cluster capability. corsair (RTX 5070 Ti, 16 GB) registers as an image gen worker in the cAIc cluster. ### Requirements: 1. **Add `"image_gen"` capability** to the cluster protocol in `cluster.py` — valid capability values should include `image_gen` 2. **Image gen API wrapper on corsair** — run ComfyUI, Automatic1111, or a lightweight API (e.g., `sd-api` or `comfyui-api`) that exposes a simple `POST /generate` endpoint accepting a prompt and returning a PNG 3. **Proxy endpoint in cAIc** — `POST /api/image/generate` on the coordinator, routes the request to corsair's image gen service via AMQP or direct HTTP 4. **Update `hardware.py`** to probe the image gen service for reachability and status 5. **Update node_agent** to report image gen capability and service status on registration ### Architecture: ``` User prompt → cAIc coordinator → AMQP/HTTP → corsair (ComfyUI/API) → PNG → coordinator → user ``` ### Considerations: - Response time: expect 5-30 seconds per image depending on model/resolution - Queue management: what if multiple requests come in at once? - Model selection: which SD/Flux model to run by default? - Resolution limits: max image size? - CORS/headers for serving generated images back to the UI ### Tests: - Mock image gen service, verify proxy routing - Verify `hardware.py` probes image gen endpoint - Verify node_agent registers with `image_gen` capability - Verify 429/503 handling when service is busy or down ### Status: ✅ Backend Complete (ComfyUI install pending on corsair) ---