Community-powered AI generation backend. Users submit jobs; workers run models; the Grid coordinates. Image (Stable Diffusion, FLUX, etc.) and text (LLM) generation via REST API.
- Python 3.9+, Flask, PostgreSQL, Redis
- Model catalog from Base (Grid Diamond contract); optional on-chain model validation
- Docker supported
- Model registry: Image/text models are read from the Grid Diamond contract on Base. Optional validation that workers only serve registered models.
- Job anchoring: Job receipts (worker, model hash, input/output hashes) can be anchored on-chain (JobAnchor contract) for verification and rewards.
- Recipes & NFTs: ComfyUI workflows stored on-chain (RecipeVault); workflows can be marked NFT-capable. Generation metadata (prompt, seed, params, model) is stored so images can be recreated from chain data + model — no need to store the image itself for proof or minting.
See docs/BLOCKCHAIN_INTEGRATION.md and core-integration-package/README.md.
# .env: database, Redis, optional BLOCKCHAIN_ENABLED, MODEL_REGISTRY_ADDRESS, BASE_RPC_URL
pip install -r requirements.txt
# PostgreSQL + Redis running, then:
python server.pyAPI: http://localhost:5000/api (or see /api for docs).
| What | Where |
|---|---|
| API usage / SDK | README_integration.md |
| Image API | README_StableHorde.md |
| Text API | README_KoboldAIHorde.md |
| Docker | README_docker.md |
| FAQ | FAQ.md |
| Blockchain setup | docs/BLOCKCHAIN_INTEGRATION.md |
- FastAPI migration: Replace Flask/Waitress with FastAPI/Uvicorn for async, SSE, and higher concurrency. Plan: docs/architecture-migration/01-fastapi-migration.md. Full migration docs: docs/architecture-migration/.