GitHub Actions
feat: Phase 2 (M14-M25, X05-X07) + Phase 3 experimental (M26-M31) + E2E tests + docs
4cd8837 | from __future__ import annotations | |
| from dataclasses import dataclass | |
| from typing import Protocol, runtime_checkable | |
| class ImageDescription: | |
| caption: str | |
| tags: list[str] | |
| objects: list[str] | |
| ocr_text: str | None | |
| backend: str | |
| ms: int | |
| class GenerationResult: | |
| image_bytes: bytes | |
| width: int | |
| height: int | |
| prompt_used: str | |
| backend: str | |
| ms: int | |
| class ImageDescribeBackend(Protocol): | |
| name: str | |
| async def describe( | |
| self, | |
| image_bytes: bytes, | |
| mode: str = "caption", | |
| ) -> ImageDescription: ... | |
| def health(self) -> dict: ... | |
| class ImageGenerateBackend(Protocol): | |
| name: str | |
| async def generate( | |
| self, | |
| prompt: str, | |
| width: int = 512, | |
| height: int = 512, | |
| steps: int = 20, | |
| lora: str | None = None, | |
| ) -> GenerationResult: ... | |
| def health(self) -> dict: ... | |