Files
cAIc/TASKS.md
T
gramps aecd3330fd feat: image generation service — ComfyUI cluster integration
- 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
2026-07-27 08:06:03 -07:00

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:

  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 cAIcPOST /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)