One interface. All your AI image providers.
Stop switching between FAL, OpenAI, Google and OpenRouter. Lumigen connects them all in one lightweight local app - no subscription, no tracking, your images stay on your machine.
Tired of juggling multiple image generation platforms? Lumigen gives you a single, clean workspace to generate, compare, and organize AI images — across all major providers.
- 🔀 One app, many providers: FAL, OpenAI, OpenRouter, Google, BFL — switch in seconds
- 🏡 Your data, your machine: images and history stay under
./data, always - ⚡ Fast creative loop: generate, tweak, rerun, and compare without leaving the app
- 📤 Data portability: Import/export profiles, models, and styles via JSON
- 📦 Complete archiving: Export full sessions as ZIP with prompts and metadata
- 🗂️ Stay organized: profiles, categories, and a full gallery workflow built in
- 🔍 Full history: every image is reproducible, metadata and all
- 🚀 Optional upscaling: Real-ESRGAN support built in
- Python 3.13+
- pip
- Optional: Docker
git clone <your-repo-url>
cd lumigenWindows PowerShell:
python -m venv .venv
.\.venv\Scripts\Activate.ps1macOS/Linux:
python -m venv .venv
source .venv/bin/activatepip install -r requirements.txtWindows:
copy .env.example .envmacOS/Linux:
cp .env.example .envFor a local-only first run, the default .env values are enough.
alembic upgrade headpython -m app.mainAlternative dev command:
uvicorn app.main:app --reload --port 8010Open: http://127.0.0.1:8010
- Open Profiles and create a profile.
- Choose provider:
- any cloud provider if API keys are configured
- Go to Generate, enter a prompt, submit.
- Check Gallery for generated assets and metadata.
Use this checklist when deploying the login/role feature to a new or existing instance.
- Install dependencies and run latest migration:
pip install -r requirements.txt
alembic upgrade head- Set a strong session secret in
.env:
SESSION_SECRET_KEY=<long-random-secret>- Configure cookie security for your environment:
- local dev over HTTP:
SESSION_HTTPS_ONLY=false - production behind HTTPS:
SESSION_HTTPS_ONLY=true
If Lumigen runs behind a reverse proxy / TLS terminator, also enable forwarded header trust so request URLs keep the https scheme:
PROXY_HEADERS_ENABLED=true
PROXY_HEADERS_TRUSTED_HOSTS=*Use a narrower trusted host/IP list instead of * when possible.
-
Start the app and open
/login. -
First login flow:
- if no users exist,
/loginshows onboarding and creates the first user asadmin - afterwards,
/loginswitches to normal sign-in mode
- Verify role behavior:
admin: full access, including/adminand all admin dialogsuser: no access to admin dialogs/routes
- Optional smoke check:
python3.12 -m pytest -q tests/routes tests/ui_routesFor local testing, you can enable a reset button in Admin → Users:
AUTH_ALLOW_ONBOARDING_RESET=trueBehavior:
- visible only for admins
- deletes all users
- logs out current session
- redirects to
/loginso onboarding is shown again
Security note:
- keep
AUTH_ALLOW_ONBOARDING_RESET=falsein production
Set provider API keys in .env for default usage:
OPENAI_API_KEYOPENROUTER_API_KEYGOOGLE_API_KEYBFL_API_KEYFAL_API_KEY
Lumigen uses the FAL.ai queue API for the fal provider.
- API docs: https://docs.fal.ai/examples/model-apis/generate-images-from-text
- Set
FAL_API_KEYin.env.
Popular models:
fal-ai/flux/schnell— FLUX Schnell (fast)fal-ai/flux/dev— FLUX Devfal-ai/flux-pro— FLUX Profal-ai/flux-pro/v1.1— FLUX Pro v1.1fal-ai/flux-pro/v1.1-ultra— FLUX Pro v1.1 Ultra
You can pass any additional FAL model parameters via the profile/request params JSON field.
Lumigen uses the Google Generative Language API for the google provider.
- Recommended Gemini image model:
gemini-2.0-flash-preview-image-generation
- Recommended Imagen model:
imagen-3.0-generate-002
Notes:
- For Gemini image generation, Lumigen calls
models/{model}:generateContent. - For Imagen models (
imagen*), Lumigen callsmodels/{model}:predict. - You can optionally override endpoint base URL (advanced/self-hosted proxy setups):
GOOGLE_BASE_URL=https://generativelanguage.googleapis.com/v1betaYou can pass provider-specific options via profile/request params. Examples:
- Gemini safety settings:
{
"safetySettings": [
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"threshold": "BLOCK_ONLY_HIGH"
}
]
}- Imagen parameters:
{
"aspectRatio": "1:1",
"personGeneration": "ALLOW_ADULT"
}For per-model custom API keys in Admin, set PROVIDER_CONFIG_KEY first.
Generate one with:
- Bash:
./scripts/generate_provider_key.sh - PowerShell:
./scripts/generate_provider_key.ps1
Run (build + start on port 7003):
macOS/Linux:
./scripts/docker_run.shWindows PowerShell:
.\scripts\docker_run.ps1Update container after pulling new changes:
macOS/Linux:
./scripts/docker_update.shWindows PowerShell:
.\scripts\docker_update.ps1Optional in .env:
DOCKER_DATA_DIR=./dataOpen: http://127.0.0.1:7003
Lumigen can upscale generated images with Real-ESRGAN NCNN Vulkan.
- Download the Linux Real-ESRGAN NCNN Vulkan binary:
- Download NCNN model files manually (
.param+.bin).- Example model names used by default:
realesrgan-x2plusandrealesrgan-x4plus - Required files per model:
realesrgan-x2plus.param+realesrgan-x2plus.bin
- Example model names used by default:
- Place the model files in your configured model directory (
UPSCALER_MODEL_DIR).- Default:
./data/models/realesrgan
- Default:
- Configure
.env:
UPSCALER_COMMAND=/usr/local/bin/realesrgan-ncnn-vulkan
UPSCALER_MODEL_DIR=./data/models/realesrganUse this if you want the executable inside the image itself.
- Copy the Linux executable into the repository at:
docker/realesrgan-ncnn-vulkan
- Rebuild/restart Docker:
- PowerShell:
./scripts/docker_update.ps1 - Bash:
./scripts/docker_update.sh
- PowerShell:
- Keep model files in shared data dir (see option B below).
During Docker build, Lumigen installs the binary automatically when this file exists.
Use this if you do not want to rebuild the image for binary updates.
- Place binary on host:
./data/bin/realesrgan-ncnn-vulkan
- Place models on host:
./data/models/realesrgan
- Configure
.env:
UPSCALER_COMMAND=/app/data/bin/realesrgan-ncnn-vulkan
UPSCALER_MODEL_DIR=/app/data/models/realesrganShared-path mapping (default):
- Host data dir:
./data - Container data dir:
/app/data - Ensure
DOCKER_DATA_DIRpoints to the host folder you want to share.
If you see:
error while loading shared libraries: libvulkan.so.1: cannot open shared object file
then rebuild the image so Vulkan runtime libraries are included:
- PowerShell:
./scripts/docker_update.ps1 - Bash:
./scripts/docker_update.sh
If you want hardware Vulkan acceleration from host GPU, ensure your Docker runtime is configured for GPU passthrough (for example NVIDIA Container Toolkit on NVIDIA systems).
- Migrations are required for schema changes: add Alembic migration under
alembic/versions/. - The app also calls
Base.metadata.create_all()during startup for local bootstrap, but Alembic remains the source of schema evolution. - Backend tests run with
pytest. - Run all backend tests:
pytest -q - Run focused suites:
pytest -q tests/unitandpytest -q tests/routes - UI route/template tests (server-rendered Jinja + HTMX):
pytest -q tests/ui_routes - Coverage baseline (terminal report):
pytest --cov=app --cov-report=term-missing -q
Lumigen now keeps theme styles split for easier manual edits while preserving one stable include in templates.
app/web/static/css/app.css: entry file imported bylayout.html.app/web/static/css/theme-base.css: shared styles (fonts, dialogs, utility classes, non-theme behavior).app/web/static/css/theme-dark.css: dark-theme-only overrides (add rules here when needed).app/web/static/css/theme-light.css: allbody[data-theme="light"]overrides.
Editing workflow:
- Put cross-theme styles in
theme-base.css. - Put light-mode adjustments in
theme-light.css. - Put dark-mode adjustments in
theme-dark.css. - Keep
app.cssas imports only so existing template references remain unchanged.
Candidate options for the new user settings dialog:
- Theme:
dark/light/system. - Session list density: compact vs comfortable rows.
- Session list behavior: infinite-scroll toggle and page size.
- Session visibility: show/hide archived sessions.
- Default workspace on open: chat/profiles/gallery/admin.
- Chat thumbnail default size:
sm/md/lg. - Prompt input submit behavior: Enter vs Ctrl+Enter.
- Auto-open advanced generation options.
- Confirm dialogs toggle for archive/delete actions.
- Gallery defaults: time preset, sort, and minimum rating.
- Language setting (
de/en) for future i18n. - Accessibility profile: larger text and stronger contrast.
The app version is managed centrally through a VERSION file in the project root. This version is displayed in both the user menu and the admin about section.
To update the version, you can either:
- Manually edit the
VERSIONfile in the project root - Use the provided script:
python scripts/update_version.py <new_version>
Example: python scripts/update_version.py 1.2.3
See LICENSE.
Third-party asset licenses:
- Bootstrap Icons font (
app/web/static/fonts/bootstrap-icons.woff2,app/web/static/fonts/bootstrap-icons.woff): MIT - See
licenses/bootstrap-icons-MIT.txtandlicenses/bootstrap-icons-NOTICE.md - Overview:
THIRD_PARTY_LICENSES.md

