--- license: mit language: - en pipeline_tag: text-to-image library_name: mlx-gen base_model: microsoft/Lens-Turbo tags: - mlx - apple-silicon - lens - text-to-image - quantized --- # Lens-Turbo — MLX pre-quantized tiers (SceneWorks) Native-MLX, **pre-quantized** re-host of [`microsoft/Lens-Turbo`](https://huggingface.co/microsoft/Lens-Turbo) for on-device Apple-Silicon inference via [`mlx-gen`](https://github.com/SceneWorks/mlx-gen)'s `mlx-gen-lens` provider (SceneWorks). The heavy components are packed offline so a tier loads directly with **no dense transient and no in-app quantization** (epic 8506, sc-8763). ## Tiers Each subdirectory is a full, self-contained turnkey snapshot (the diffusers multi-component tree — `transformer/`, `text_encoder/`, `vae/`, `tokenizer/`, `scheduler/`, `model_index.json`): | Tier | Dir | What is packed | |------|-----|----------------| | **Q4** (default) | `q4/` | DiT + gpt-oss encoder MoE experts → MLX group-64 affine 4-bit | | **Q8** | `q8/` | DiT + gpt-oss encoder MoE experts → MLX group-64 affine 8-bit | | **bf16** | `bf16/` | dense mirror of the source (no quantization) | Two components are quantized (matching the load-time `.quantize` scope): - **DiT** — `img_in`/`txt_in`/`proj_out` + every block's fused-QKV attention projections (`img_qkv`/`txt_qkv`/`to_out.0`/`to_add_out`) and SwiGLU MLPs. The timestep embedder, AdaLN modulations, and all norms stay full precision. - **gpt-oss-20b encoder MoE experts** — the source ships these as MXFP4; the packed tiers store them as MLX group-64 affine Q4/Q8 (stacked `experts.{gate_up,down}_proj.{weight,scales,biases}`). The router / attention / embeddings / norms stay dense. The **VAE** (the shared Flux.2 decoder) always runs f32 and is shipped dense in every tier. The pack is **byte-identical** to what the load-time quantizer produces (bf16 cast, group 64), verified in-repo (`mlx-gen-lens` `convert`/`quant` byte-identity tests) and by an on-device render gate. ## License MIT, inherited from `microsoft/Lens-Turbo`. This is a format re-host; all model weights and credit belong to the original authors (Microsoft Research).