Serverless GPU (RunPod)
Custom RunPod serverless worker for FlixML. Bakes FLUX.2 models + your LoRAs into a Docker image.
What’s inside
Section titled “What’s inside”| Model | Path in image | Size |
|---|---|---|
flux2_dev_fp8mixed.safetensors |
models/diffusion_models/ |
~17 GB |
mistral_3_small_flux2_bf16.safetensors |
models/text_encoders/ |
~8 GB |
flux2-vae.safetensors |
models/vae/ |
~300 MB |
Your LoRAs (docker/loras/*.safetensors) |
models/loras/ |
varies |
Build + Push
Section titled “Build + Push”cd flixml/dockerIMAGE=<your-dockerhub-user>/flixml-flux2 ./build.shRequires:
- Docker Desktop or Docker Engine
docker loginto Docker Hub
Deploy on RunPod
Section titled “Deploy on RunPod”- Go to RunPod Console → Serverless
- Create endpoint
- Template → “Custom Image” → enter
<your-dockerhub-user>/flixml-flux2:latest - GPU → pick your poison (RTX 4090 is cheapest, ~$0.50/hr)
- Copy the Endpoint ID into FlixML
.env:RUNPOD_API_KEY=your_key_hereRUNPOD_ENDPOINT_ID=your_endpoint_id_here
Adding more LoRAs
Section titled “Adding more LoRAs”Drop .safetensors files into docker/loras/ and rebuild:
cp new_lora.safetensors docker/loras/cd docker && ./build.sh