Install
FlixML runs on your own hardware. You need a machine (or machines) that can run ComfyUI, plus a small API and UI that route work to it.
Prerequisites
Section titled “Prerequisites”- Python 3.10+
- Node.js 18+
- PostgreSQL
- A running ComfyUI instance — local, remote, or serverless
Install
Section titled “Install”git clone https://github.com/ortegarod/flixml.gitcd flixml
# Config: environment variables and your ComfyUI nodescp .env.example .envcp config.example.json config.json# Edit .env and config.json for your machine
# API (from the repo root). Migrations run automatically.pip install -r requirements.txtcreatedb flixml_studioset -a; . ./.env; set +aPYTHONPATH=app python -m flixml
# Studio UI, in a second terminal from the repo rootset -a; . ./.env; set +acd studio && npm install && npm run devConfigure your GPU
Section titled “Configure your GPU”A provider is any GPU that runs ComfyUI. FlixML doesn’t care where it lives — a box under your desk, a server across the network, or serverless GPU. The API stays identical; the location is just configuration.
Add your ComfyUI URL to config.json so FlixML can route jobs to it:
{ "gpu_nodes": [ { "id": "gpu-1", "roles": ["image"], "comfyui": { "url": "http://<host>:<port>" } }, { "id": "gpu-2", "roles": ["video"], "comfyui": { "url": "http://<host>:<port>" } } ]}Role-based routing
Section titled “Role-based routing”Each node declares roles. FlixML routes each job to a node that can serve it, so a video job never lands on an image-only node. Common roles:
image— image generationvideo— video generation
A single node can carry multiple roles (["image", "video"]) if its VRAM can handle both.
Scaling out
Section titled “Scaling out”Add more nodes to gpu_nodes and FlixML load-balances across them by role — no code changes. Start with one GPU; add more when you need throughput.
Discovering providers at runtime
Section titled “Discovering providers at runtime”Ask the API what’s configured and healthy:
curl <your-api-url>/api/providersReference a provider by its id when you generate.
Secure your install
Section titled “Secure your install”A fresh install requires no key, so anyone who can reach it has full access. Before you expose it beyond your own machine, create an admin key in Studio under Settings → API keys, then set "security": { "require_api_key": true } in config.json. API Keys & Access has the steps, including a command for machines without a browser.
Key environment variables
Section titled “Key environment variables”| Variable | Description |
|---|---|
FLIXML_API_URL |
URL the Studio UI uses to reach the backend |
DATABASE_URL |
PostgreSQL connection string |
FLIXML_OUTPUT_DIR |
Directory where generated media is stored |
FLIXML_TRAINING_DIR |
Required. Local folder for LoRA training datasets and configs |
FLIXML_LORA_OUTPUT_DIR |
Required. Local folder where trained LoRAs are saved |
FLIXML_COMFY_LORA_DIR |
Required. ComfyUI models/loras folder trained LoRAs are copied to |
ELEVENLABS_API_KEY |
Optional. Lists ElevenLabs voices at /api/tts/voices and speaks lines at /api/tts/generate. |
ELEVENLABS_VOICE_ID |
Optional. Default voice for /api/tts/generate when the request names none. |
See .env.example for the full list.
Installed? Getting Started runs your first generation.