mflux
TLDR
Generate an image from a text prompt
SYNOPSIS
mflux-generate --prompt text --model name [options]
DESCRIPTION
mflux is a Flux image generation tool built natively on Apple's MLX framework, optimized for Apple Silicon (M1/M2/M3/M4). It generates images locally using Flux models without requiring a GPU server or cloud API.
Installation is via pip (`pip install mflux`). The tool downloads model weights on first use and caches them locally.
Flux-schnell is faster with fewer steps needed. Flux-dev produces higher quality but takes longer. Quantization (4-bit or 8-bit) reduces memory usage for running on machines with limited unified memory.
LoRA adapters allow fine-tuned styles and concepts to be applied on top of base models.
PARAMETERS
--prompt TEXT
Text prompt for image generation.--model NAME
Model to use (flux, flux-dev, flux-schnell).--output FILE
Output image path.--width PX
Image width in pixels.--height PX
Image height in pixels.--steps N
Number of inference steps.--seed INT
Random seed for reproducibility.--quantize BITS
Quantization level (4 or 8 bit).--lora-path FILE
Path to LoRA adapter weights.--guidance FLOAT
Guidance scale.
CAVEATS
Apple Silicon only (M-series Macs). Requires Python 3.10+. Model downloads are several GB. Memory usage depends on model and quantization level. Limited to Flux model family.
HISTORY
mflux was created by Filip Strand in 2024 to bring native Flux image generation to Apple Silicon using the MLX framework. It provides a streamlined alternative to running Stable Diffusion through compatibility layers on macOS.


