add /image: lens tokens -> hosted text-to-image (fal.ai), paid sibling to the free sigil
Backend: POST /image {tokens: [...]} builds a prompt from a run's own lens
tokens (same source as paintSigil, not a self-report) and calls fal.ai
(FAL_IMAGE_MODEL, default fal-ai/flux/schnell). Own tighter money guard
(5/min/IP, 100/hr global — worst case ~$1/hr) separate from the inject
rate limit, since this costs per-call regardless of generation length.
503s cleanly if FAL_KEY isn't set (it isn't yet — needs a key from the
user). Requires httpx, added to requirements.txt.
Frontend: a "image this (experimental, costs real money)" button appears
next to the sigil once a run's lens tokens arrive, on both the auto-cycle
cards and the "cause it yourself" panel's tracks. Deliberately a manual
click, not automatic.
This commit is contained in:
1 parent
fd2a6b627f
commit
b663308c66
3 files changed
+169
-2
No files matched your search
@@ -2,4 +2,5 @@ torch --index-url https://download.pytorch.org/whl/cpu
|
||||
transformers>=4.51
|
||||
accelerate
|
||||
fastapi
|
||||
uvicorn[standard]
|
||||
uvicorn[standard]
|
||||
httpx
|
||||
Reference in new issue
Block a user