A fully local AI image generation app powered by FLUX.2-klein-4B, running on your Mac (Apple Silicon / MPS) or CPU. Includes a Flask API backend, a React frontend, and an MCP server for Claude Code integration.
Q4_K_M by default, ~2.6 GB) for low memory usageoutputs/ with metadatabash setup.sh
This will:
The GGUF model (~2.6 GB for Q4_K_M) is downloaded automatically from HuggingFace on the first generation request.
Production (serves the built React frontend):
source venv/bin/activate
python app.py
# Open http://localhost:5001
Development (hot reload):
# Terminal 1
source venv/bin/activate && python app.py
# Terminal 2
cd frontend && npm run dev
# Open http://localhost:3000
Control memory usage via the FLUX_QUANT environment variable:
| Quant | Size | Quality |
|---|---|---|
Q8_0 | ~7.75 GB | Higher |
Q4_K_M | ~2.6 GB | Default |
FLUX_QUANT=Q8_0 python app.py
| Endpoint | Method | Description |
|---|---|---|
GET /status | GET | Model load status and device info |
/generate | POST | Generate image(s) |
Generate request body:
{
"prompt": "a cat on the moon",
"mode": "txt2img",
"width": 768,
"height": 768,
"steps": 4,
"guidance_scale": 4.0,
"seed": null,
"num_images": 1,
"images": []
}
The MCP server (mcp_server.py) exposes image generation tools to Claude Code. Configure it in .mcp.json to use the tools directly from your Claude session.
MIT
7 commits
1 commits
HTML
44.4%
JavaScript
40.0%
Python
12.7%
CSS
1.6%
Shell
1.2%
A fully local AI image generation app powered by FLUX.2-klein-4B, running on your Mac (Apple Silicon / MPS) or CPU. Includes a Flask API backend, a React frontend, and an MCP server for Claude Code integration.
Q4_K_M by default, ~2.6 GB) for low memory usageoutputs/ with metadatabash setup.sh
This will:
The GGUF model (~2.6 GB for Q4_K_M) is downloaded automatically from HuggingFace on the first generation request.
Production (serves the built React frontend):
source venv/bin/activate
python app.py
# Open http://localhost:5001
Development (hot reload):
# Terminal 1
source venv/bin/activate && python app.py
# Terminal 2
cd frontend && npm run dev
# Open http://localhost:3000
Control memory usage via the FLUX_QUANT environment variable:
| Quant | Size | Quality |
|---|---|---|
Q8_0 | ~7.75 GB | Higher |
Q4_K_M | ~2.6 GB | Default |
FLUX_QUANT=Q8_0 python app.py
| Endpoint | Method | Description |
|---|---|---|
GET /status | GET | Model load status and device info |
/generate | POST | Generate image(s) |
Generate request body:
{
"prompt": "a cat on the moon",
"mode": "txt2img",
"width": 768,
"height": 768,
"steps": 4,
"guidance_scale": 4.0,
"seed": null,
"num_images": 1,
"images": []
}
The MCP server (mcp_server.py) exposes image generation tools to Claude Code. Configure it in .mcp.json to use the tools directly from your Claude session.
MIT
7 commits
1 commits
HTML
44.4%
JavaScript
40.0%
Python
12.7%
CSS
1.6%
Shell
1.2%