aecd3330fd
- POST /api/image/generate proxy endpoint (admin required) - GET /api/image/status lists available image gen nodes - Cluster AMQP protocol: cmd.image_generate, image_generated, image_failed - Node agent auto-detects ComfyUI, registers image_gen capability - ComfyUI workflow builder: CheckpointLoader → KSampler → VAEDecode → SaveImage - Hardware probe checks ComfyUI reachability + checkpoint model list - 27 tests covering cluster handlers, router, node agent, hardware, capabilities - Config: CAIC_COMFYUI_BASE, CAIC_COMFYUI_TIMEOUT, comfyui_port in agent.ini - Version bump to v1.1.0 - Documentation: ai.md, wiki/Developer-Architecture.md, current-wip.md, README.md, .env.example
1.7 KiB
1.7 KiB
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:
- Add
"image_gen"capability to the cluster protocol incluster.py— valid capability values should includeimage_gen - Image gen API wrapper on corsair — run ComfyUI, Automatic1111, or a lightweight API (e.g.,
sd-apiorcomfyui-api) that exposes a simplePOST /generateendpoint accepting a prompt and returning a PNG - Proxy endpoint in cAIc —
POST /api/image/generateon the coordinator, routes the request to corsair's image gen service via AMQP or direct HTTP - Update
hardware.pyto probe the image gen service for reachability and status - 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.pyprobes image gen endpoint - Verify node_agent registers with
image_gencapability - Verify 429/503 handling when service is busy or down